home *** CD-ROM | disk | FTP | other *** search
/ ring.yamanashi.ac.jp/pub/pc/freem/action/ / action.zip / panhumu121.zip / panhumu121 / game / script / ending.dat next >
Text File  |  2006-04-05  |  23KB  |  1,125 lines

  1. //Åëè·ë╗è╓Éö
  2. function OnInit()
  3. {
  4.     new("isPushButton1",1);
  5.     new("isPushButton3",1);
  6.     new("isNext",0);
  7.  
  8.     new("mode",0);
  9.     new("temp_mode",0);
  10.     new("temp_modeend",0);
  11.     new("time",0);
  12.     new("maxtime",0);
  13.     new("col",0);
  14.  
  15.     new("all_y",0);
  16.     new("text_x",10);
  17.     new("text_y",440);
  18.  
  19.     new("temp",0);
  20.     new("coin_rank",-1);
  21.     new("time_rank",-1);
  22.     new("total_rank",-1);
  23.  
  24.     new("time_m",0);
  25.     new("time_s",0);
  26.  
  27.     new("pan_x",0);
  28.     new("pan_y",0);
  29.  
  30.     //LoadWave
  31.     LoadWave(0,"etc\power21.wav");
  32.     LoadWave(1,"etc\fall06.wav");
  33.     LoadWave(2,"etc\hit_s11_b.wav");
  34.  
  35.     //LoadMidi
  36.     PlayMidi("ending\tam-g02.mid");
  37.  
  38.     LoadTexure("data\ending\chara.bmp",0);
  39.     LoadTexure("data\ending\result.bmp",1);
  40.     LoadTexure("data\ending\pan.bmp",3);
  41.     LoadTexure("data\ending\shop.bmp",6);
  42.  
  43.     temp = GetData("left_time")/(1000/15);
  44.     time_m = temp/60;
  45.     time_s = temp%60;
  46.  
  47.     //TimeRank
  48.     if(time_rank<0 && time_m > 7){
  49.         time_rank = 3;
  50.     }
  51.     if(time_rank<0 && time_m > 5){
  52.         time_rank = 2;
  53.     }
  54.     if(time_rank<0 && time_m > 3){
  55.         time_rank = 1;
  56.     }
  57.     if(time_rank<0 && time_m > 0){
  58.         time_rank = 0;
  59.     }
  60.     if(GetData("continue_count") > 0){
  61.         time_rank = 0;
  62.     }
  63.  
  64.     //CoinRank
  65.     temp = GetData("coin_count")/GetData("max_coin_count");
  66.     if(coin_rank<0 && temp<0.125){
  67.         coin_rank = 0;
  68.         pan_x = 0;
  69.         pan_y = 0;
  70.         LoadTexure("data\ending\miss.bmp",5);
  71.     }
  72.     if(coin_rank<0 && temp<0.25){
  73.         coin_rank = 1;
  74.         pan_x = 1;
  75.         pan_y = 0;
  76.         LoadTexure("data\ending\clear.bmp",5);
  77.     }
  78.     if(coin_rank<0 && temp<1.0){
  79.         coin_rank = 2;
  80.         pan_x = 0;
  81.         pan_y = 1;
  82.         LoadTexure("data\ending\clear.bmp",5);
  83.     }
  84.     if(coin_rank<0 && temp<=1.0){
  85.         coin_rank = 3;
  86.         pan_x = 1;
  87.         pan_y = 1;
  88.         LoadTexure("data\ending\clear.bmp",5);
  89.     }
  90.  
  91.     total_rank = time_rank + coin_rank;
  92.     if(total_rank>=0 && total_rank<3){
  93.         LoadTexure("data\ending\mark2.bmp",2);
  94.     }
  95.     if(total_rank>=3){
  96.         LoadTexure("data\ending\mark1.bmp",2);
  97.     }
  98.  
  99.     isPushButton1 = 1;
  100.     isPushButton3 = 1;
  101. }
  102.  
  103. function OnProc()
  104. {
  105.     isNext = 0;
  106.     col=255;
  107.  
  108.     if(GetKeyData("isButton1") == 1){
  109.         if(isPushButton1 <= 0){
  110.             isNext = 1;
  111.         }
  112.         isPushButton1 = 1;
  113.     }
  114.     else{
  115.         isPushButton1 = 0;
  116.     }
  117.  
  118.     if(GetKeyData("isButton3") == 1){
  119.         if(isPushButton3 <= 0){
  120.             if(mode < 99){
  121.                 mode = 99;
  122.             }
  123.             else{
  124.                 if(mode < 200){
  125.                     mode = 200;
  126.                 }
  127.                 else{
  128.                     mode = 999;
  129.                 }
  130.             }
  131.             time = 0;
  132.         }
  133.         isPushButton3 = 1;
  134.     }
  135.     else{
  136.         isPushButton3 = 0;
  137.     }
  138.     
  139.     time += 1;
  140.  
  141.     if(mode < 10){
  142.         DrawTexure(9,0,430,640,100,0.0,0,395,256,512,0,0,0,1,0,0,1);
  143.  
  144.         switch(mode){
  145.             case 0:
  146.                 maxtime = 60;
  147.                 temp = (time/maxtime);
  148.                 if(temp>1.0){
  149.                     temp = 1.0;
  150.                 }
  151.                 if(temp<0.25){
  152.                     DrawTexure(6,320,240,256*(0.125+temp*0.875),256*(0.125+temp*0.875),0.0,0,0,256,256,1,1,1,1,0.5,0.75,0);
  153.                 }
  154.                 if(temp>=0.25 && temp<0.5){
  155.                     DrawTexure(6,320,240,256*(0.125+temp*0.875),256*(0.125+temp*0.875),0.0,0,256,256,512,1,1,1,1,0.5,0.75,0);
  156.                 }
  157.                 if(temp>=0.5){
  158.                     DrawTexure(6,320,240,256*(0.125+temp*0.875),256*(0.125+temp*0.875),0.0,256,0,512,256,1,1,1,1,0.5,0.75,0);
  159.                 }
  160.                 DrawText(text_x,text_y,"é▄üAè╘é╔ìçé┴é╜ü`",255,255,255,25);
  161.                 if(time>=maxtime){
  162.                     if(isNext > 0){
  163.                         time = 0;
  164.                         mode = 2;
  165.                     }
  166.                     else{
  167.                         time = maxtime;
  168.                         DrawText(640-25,480-25,"üñ",255,255,255,25);
  169.                     }
  170.                 }
  171.             break;
  172.             case 2:
  173.                 maxtime = 0;
  174.                 DrawTexure(6,320,240,256,256,0.0,256,0,512,256,1,1,1,1,0.5,0.75,0);
  175.                 DrawText(text_x,text_y,"é╖é▌é▄é╣ü`é±",255,255,255,25);
  176.                 if(time>=maxtime){
  177.                     if(isNext > 0){
  178.                         time = 0;
  179.                         mode = 4;
  180.                     }
  181.                     else{
  182.                         time = maxtime;
  183.                         DrawText(640-25,480-25,"üñ",255,255,255,25);
  184.                     }
  185.                 }
  186.             break;
  187.             case 4:
  188.                 maxtime = 60;
  189.                 temp = (time/maxtime);
  190.                 if(temp>1.0){
  191.                     temp = 1.0;
  192.                 }
  193.                 DrawTexure(6,320,240,256*(1+temp*3),256*(1+temp*3),0.0,256,0,512,256,1,1,1,1,0.5,0.75,0);
  194.                 DrawTexure(9,320,240,640,480,0.0,256,0,512,256,1,1,1,temp,0.5,0.5,1);
  195.  
  196.                 DrawText(text_x,text_y,"é╖é▌é▄é╣ü`é±",255,255,255,25);
  197.                 if(time>=maxtime){
  198.                     time = 0;
  199.                     mode = 10;
  200.                 }
  201.             break;
  202.         }
  203.     }
  204.  
  205.     //üÖ
  206.     if(mode>=10 && mode<99){
  207.         DrawTexure(9,0,0,640,480,0.0,0,0,256,256,1,1,1,1,0,0,0);
  208.         DrawTexure(9,0,430,640,100,0.0,0,395,256,512,0,0,0,1,0,0,1);
  209.  
  210.         switch(coin_rank){
  211.             case 1:
  212.                 callfunction(Proc1);
  213.             break;
  214.             case 2:
  215.                 callfunction(Proc2);
  216.             break;
  217.             case 3:
  218.                 callfunction(Proc3);
  219.             break;
  220.             case 0:
  221.                 callfunction(Proc0);
  222.         }
  223.     }
  224.  
  225.     //üÖ
  226.     if(mode>=99 && mode<200){
  227.         temp_mode = mode-99;
  228.         temp_modeend = 200;
  229.         DrawTexure(9,0,0,640,480,0.0,0,0,512,384,0,0,0,1,0,0,0);
  230.         callfunction(Roll);
  231.     }
  232.  
  233.     //üÖ
  234.     if(mode>=200 && mode<300){
  235.         temp_mode = mode-200;
  236.         temp_modeend = 999;
  237.         callfunction(Result);
  238.     }
  239.  
  240.     if(mode>=999){
  241.         SetData("next","char","1");
  242.     }
  243. }
  244.  
  245. function Proc0()
  246. {
  247.     switch(mode){
  248.         case 10:
  249.             maxtime = 0;
  250.             time = 0;
  251.             mode = 11;
  252.             temp = 0.0;
  253.             StopMidi();
  254.         break;
  255.         case 11:
  256.             maxtime = 0;
  257.             DrawText(text_x,text_y,"üué╟üAé╟éñéαü`",255,255,255,25);
  258.             if(time>=maxtime){
  259.                 if(isNext > 0){
  260.                     time = 0;
  261.                     mode = 12;
  262.                     temp = 0.0;
  263.                 }
  264.                 else{
  265.                     time = maxtime;
  266.                     DrawText(640-25,480-25,"üñ",255,255,255,25);
  267.                 }
  268.             }
  269.         break;
  270.         case 12:
  271.             maxtime = 0;
  272.             temp += 0.025;
  273.             if(temp >= 1.0){
  274.                 temp = 1.0;
  275.             }
  276.             DrawTexure(5,320,240,640,480,0.0,0,0,256,256,1,1,1,temp,0.5,0.5,0);
  277.             DrawTexure(0,520,350,212,210,0.0,300,90,512,300,1,1,1,1.0,0.5,0.5,0);
  278.             DrawText(text_x,text_y,"é╚üAé╚é╔éαé⌐éªé╚é⌐é┴é╜üEüEüE",255,255,255,25);
  279.             if(time>=maxtime){
  280.                 if(isNext > 0){
  281.                     time = 0;
  282.                     mode = 13;
  283.                     temp = 0.0;
  284.                 }
  285.                 else{
  286.                     time = maxtime;
  287.                     DrawText(640-25,480-25,"üñ",255,255,255,25);
  288.                 }
  289.             }
  290.         break;
  291.         case 13:
  292.             maxtime = 0;
  293.             temp += 0.025;
  294.             if(temp >= 1.0){
  295.                 temp = 1.0;
  296.             }
  297.             col = (1.0-temp)*255;
  298.             DrawTexure(5,320,240,640,480,0.0,0,0,256,256,1,1,1,1,0.5,0.5,0);
  299.             DrawTexure(0,520,350,212,210,0.0,300,90,512,300,1,1,1,1.0,0.5,0.5,0);
  300.             DrawText(text_x,text_y,"é╚üAé╚é╔éαé⌐éªé╚é⌐é┴é╜üEüEüE",col,col,col,25);
  301.  
  302.             DrawTexure(9,320,240,650,490,0,0,0,256,256,0,0,0,temp,0.5,0.5,0);
  303.  
  304.             if(temp >= 1.0){
  305.                 time = 0;
  306.                 mode = 99;
  307.             }
  308.         break;
  309.     }
  310. }
  311.  
  312. function Proc1()
  313. {
  314.     switch(mode){
  315.         case 10:
  316.             maxtime = 0;
  317.             time = 0;
  318.             mode = 11;
  319.             temp = 0.0;
  320.         break;
  321.         case 11:
  322.             maxtime = 0;
  323.             DrawText(text_x,text_y,"üuéáéΦé¬é╞éñé▓é┤éóé▄é╡é╜ü`",255,255,255,25);
  324.             if(time>=maxtime){
  325.                 if(isNext > 0){
  326.                     time = 0;
  327.                     mode = 12;
  328.                     temp = 0.0;
  329.                 }
  330.                 else{
  331.                     time = maxtime;
  332.                     DrawText(640-25,480-25,"üñ",255,255,255,25);
  333.                 }
  334.             }
  335.         break;
  336.         case 12:
  337.             maxtime = 0;
  338.  
  339.             if(time >=360){
  340.                 time = 0;
  341.             }
  342.             temp += 0.025;
  343.             if(temp >= 1.0){
  344.                 temp = 1.0;
  345.             }
  346.             DrawTexure(5,260,176,1024,1024,time,0,0,256,256,1,1,1,temp,0.5,0.5,0);
  347.             DrawTexure(0,520,350,700,700,0.0,0,0,300,300,1,1,1,1,0.5,0.5,0);
  348.             DrawTexure(3,260,176,128,128,0.0,128*pan_x,128*pan_y,128*pan_x+128,128*pan_y+128,1,1,1,1,0.5,0.5,0);
  349.             DrawText(text_x,text_y,"é▒éΩé╢éßüAé¿é╚é⌐éóé┴é╧éóé╔é╚éτé╚éóéµü`",255,255,255,25);
  350.  
  351.             if(isNext > 0){
  352.                 mode = 13;
  353.                 temp = 0.0;
  354.                 FeedOutMidi(1000);
  355.             }
  356.             else{
  357.                 DrawText(640-25,480-25,"üñ",255,255,255,25);
  358.             }
  359.         break;
  360.         case 13:
  361.             maxtime = 0;
  362.  
  363.             if(time >=360){
  364.                 time = 0;
  365.             }
  366.             temp += 0.025;
  367.             if(temp >= 1.0){
  368.                 temp = 1.0;
  369.             }
  370.  
  371.             col = (1.0-temp)*255;
  372.             DrawTexure(5,260,176,1024,1024,time,0,0,256,256,1,1,1,1,0.5,0.5,0);
  373.             DrawTexure(0,520,350,700,700,0.0,0,0,300,300,1,1,1,1,0.5,0.5,0);
  374.             DrawTexure(3,260,176,128,128,0.0,128*pan_x,128*pan_y,128*pan_x+128,128*pan_y+128,1,1,1,1,0.5,0.5,0);
  375.             DrawText(text_x,text_y,"é▒éΩé╢éßüAé¿é╚é⌐éóé┴é╧éóé╔é╚éτé╚éóéµü`",col,col,col,25);
  376.  
  377.             DrawTexure(9,320,240,650,490,0,0,0,256,256,0,0,0,temp,0.5,0.5,0);
  378.  
  379.             if(temp >= 1.0){
  380.                 time = 0;
  381.                 mode = 99;
  382.             }
  383.         break;
  384.     }
  385. }
  386.  
  387. function Proc2()
  388. {
  389.     switch(mode){
  390.         case 10:
  391.             maxtime = 0;
  392.             time = 0;
  393.             mode = 11;
  394.             temp = 0.0;
  395.         break;
  396.         case 11:
  397.             maxtime = 0;
  398.             DrawText(text_x,text_y,"üuéáéΦé¬é╞éñé▓é┤éóé▄é╡é╜ü`",255,255,255,25);
  399.             if(time>=maxtime){
  400.                 if(isNext > 0){
  401.                     time = 0;
  402.                     mode = 12;
  403.                     temp = 0.0;
  404.                 }
  405.                 else{
  406.                     time = maxtime;
  407.                     DrawText(640-25,480-25,"üñ",255,255,255,25);
  408.                 }
  409.             }
  410.         break;
  411.         case 12:
  412.             maxtime = 0;
  413.             if(time >=360){
  414.                 time = 0;
  415.             }
  416.  
  417.             temp += 0.025;
  418.             if(temp >= 1.0){
  419.                 temp = 1.0;
  420.             }
  421.             DrawTexure(5,260,176,1024,1024,time,0,0,256,256,1,1,1,temp,0.5,0.5,0);
  422.             DrawTexure(0,520,350,700,700,0.0,0,0,300,300,1,1,1,1,0.5,0.5,0);
  423.             DrawTexure(3,260,176,128,128,0.0,128*pan_x,128*pan_y,128*pan_x+128,128*pan_y+128,1,1,1,1,0.5,0.5,0);
  424.             DrawText(text_x,text_y,"î╢âpâôé╢éßé╚éóé»é╟üAé▄üAé▒éΩé┼éóéóé⌐üEüEüE",255,255,255,25);
  425.             if(isNext > 0){
  426.                 mode = 13;
  427.                 temp = 0.0;
  428.                 FeedOutMidi(1000);
  429.             }
  430.             else{
  431.                 DrawText(640-25,480-25,"üñ",255,255,255,25);
  432.             }
  433.         break;
  434.         case 13:
  435.             maxtime = 0;
  436.             if(time >=360){
  437.                 time = 0;
  438.             }
  439.  
  440.             temp += 0.025;
  441.             if(temp >= 1.0){
  442.                 temp = 1.0;
  443.             }
  444.  
  445.             col = (1.0-temp)*255;
  446.             DrawTexure(5,260,176,1024,1024,time,0,0,256,256,1,1,1,1,0.5,0.5,0);
  447.             DrawTexure(0,520,350,700,700,0.0,0,0,300,300,1,1,1,1,0.5,0.5,0);
  448.             DrawTexure(3,260,176,128,128,0.0,128*pan_x,128*pan_y,128*pan_x+128,128*pan_y+128,1,1,1,1,0.5,0.5,0);
  449.             DrawText(text_x,text_y,"î╢âpâôé╢éßé╚éóé»é╟üAé▄üAé▒éΩé┼éóéóé⌐üEüEüE",col,col,col,25);
  450.  
  451.             DrawTexure(9,320,240,650,490,0,0,0,256,256,0,0,0,temp,0.5,0.5,0);
  452.  
  453.             if(temp >= 1.0){
  454.                 time = 0;
  455.                 mode = 99;
  456.             }
  457.         break;
  458.     }
  459. }
  460.  
  461. function Proc3()
  462. {
  463.     switch(mode){
  464.         case 10:
  465.             maxtime = 0;
  466.             time = 0;
  467.             mode = 11;
  468.             temp = 0.0;
  469.         break;
  470.         case 11:
  471.             maxtime = 0;
  472.             DrawText(text_x,text_y,"üuéáéΦé¬é╞éñé▓é┤éóé▄é╡é╜ü`",255,255,255,25);
  473.             if(time>=maxtime){
  474.                 if(isNext > 0){
  475.                     time = 0;
  476.                     mode = 12;
  477.                     temp = 0.0;
  478.                 }
  479.                 else{
  480.                     time = maxtime;
  481.                     DrawText(640-25,480-25,"üñ",255,255,255,25);
  482.                 }
  483.             }
  484.         break;
  485.         case 12:
  486.             maxtime = 0;
  487.             if(time >=360){
  488.                 time = 0;
  489.             }
  490.             temp += 0.025;
  491.             if(temp >= 1.0){
  492.                 temp = 1.0;
  493.             }
  494.             DrawTexure(5,260,176,1024,1024,time,0,0,256,256,1,1,1,temp,0.5,0.5,0);
  495.             DrawTexure(0,520,350,700,700,0.0,0,0,300,300,1,1,1,1,0.5,0.5,0);
  496.             DrawTexure(3,260,176,128,128,0.0,128*pan_x,128*pan_y,128*pan_x+128,128*pan_y+128,1,1,1,1,0.5,0.5,0);
  497.             DrawText(text_x,text_y,"é▒éΩé¬î╢âpâôüIüI",255,255,255,25);
  498.  
  499.             if(isNext > 0){
  500.                 mode = 13;
  501.                 temp = 0.0f;
  502.                 FeedOutMidi(1000);
  503.             }
  504.             else{
  505.                 DrawText(640-25,480-25,"üñ",255,255,255,25);
  506.             }
  507.         break;
  508.         case 13:
  509.             maxtime = 0;
  510.             if(time >=360){
  511.                 time = 0;
  512.             }
  513.             temp += 0.025;
  514.             if(temp >= 1.0){
  515.                 temp = 1.0;
  516.             }
  517.  
  518.             col = (1.0-temp);
  519.             DrawTexure(5,260,176,1024,1024,time,0,0,256,256,1,1,1,1,0.5,0.5,0);
  520.             DrawTexure(0,520,350,700,700,0.0,0,0,300,300,1,1,1,1,0.5,0.5,0);
  521.             DrawTexure(3,260,176,128,128,0.0,128*pan_x,128*pan_y,128*pan_x+128,128*pan_y+128,1,1,1,1,0.5,0.5,0);
  522.             DrawText(text_x,text_y,"é▒éΩé¬î╢âpâôüIüI",col,col,col,25);
  523.  
  524.             DrawTexure(9,320,240,650,490,0,0,0,256,256,0,0,0,temp,0.5,0.5,0);
  525.  
  526.             if(temp >= 1.0){
  527.                 time = 0;
  528.                 mode = 99;
  529.             }
  530.         break;
  531.     }
  532. }
  533.  
  534. function Result()
  535. {
  536.     switch(temp_mode){
  537.         case 0:
  538.             maxtime = 60;
  539.  
  540.             if(time>=maxtime){
  541.                 time = 0;
  542.                 mode = mode+1;
  543.             }
  544.         break;
  545.         case 1:
  546.             maxtime = 30;
  547.  
  548.             if(time>=maxtime){
  549.                 time = 0;
  550.                 mode = mode+1;
  551.             }
  552.         break;
  553.         case 2:
  554.             maxtime = 30;
  555.  
  556.             if(time>=maxtime){
  557.                 time = 0;
  558.                 mode = mode+1;
  559.             }
  560.         break;
  561.         case 3:
  562.             maxtime = 30;
  563.  
  564.             if(time>=maxtime){
  565.                 time = 0;
  566.                 mode = mode+1;
  567.             }
  568.         break;
  569.  
  570.         case 4:
  571.             maxtime = 20;
  572.             temp = (time/maxtime);
  573.  
  574.             if(time==1){
  575.                 PlayWave(0);
  576.             }
  577.  
  578.             if(time>=maxtime){
  579.                 time = 0;
  580.                 mode = mode+1;
  581.             }
  582.         break;
  583.         case 5:
  584.             maxtime = 20;
  585.  
  586.             if(time==1){
  587.                 PlayWave(0);
  588.             }
  589.  
  590.             if(time>=maxtime){
  591.                 time = 0;
  592.                 mode = mode+1;
  593.             }
  594.         break;
  595.         case 6:
  596.             maxtime = 20;
  597.  
  598.             if(time==1){
  599.                 PlayWave(0);
  600.             }
  601.  
  602.             if(time>=maxtime){
  603.                 time = 0;
  604.                 mode = mode+1;
  605.             }
  606.         break;
  607.  
  608.         case 7:
  609.             maxtime = 60;
  610.  
  611.             if(time==1){
  612.                 PlayWave(1);
  613.             }
  614.  
  615.             if(time>=maxtime){
  616.                 time = 0;
  617.                 mode = mode+1;
  618.             }
  619.         break;
  620.  
  621.         case 8:
  622.             maxtime = 20;
  623.  
  624.             if(time==1){
  625.                 PlayWave(2);
  626.             }
  627.  
  628.             temp = time/maxtime;
  629.             all_y = sin(temp*3.14*4)*(80-80*temp);
  630.  
  631.             if(time>=maxtime){
  632.                 if(isNext > 0){
  633.                     time = 0;
  634.                     mode = mode+1;
  635.                 }
  636.                 else{
  637.                     time = maxtime;
  638.                 }
  639.             }
  640.         break;
  641.  
  642.         case 9:
  643.             maxtime = 60;
  644.             
  645.             col = (1.0 - time/maxtime)*255;
  646.  
  647.             if(time>=maxtime){
  648.                 time = 0;
  649.                 mode = mode+1;
  650.                 temp_mode = temp_mode+1;
  651.             }
  652.         break;
  653.  
  654.         case 10:
  655.             maxtime = 60;
  656.  
  657.             col = 0;
  658.  
  659.             if(time>=maxtime){
  660.                 mode = temp_modeend;
  661.             }
  662.         break;
  663.     }
  664.  
  665.     //Draw
  666.     if(temp_mode >= 0){    //Result
  667.         if(temp_mode == 0){
  668.             temp = (time/maxtime);
  669.         }
  670.         else{
  671.             temp = 1;
  672.         }
  673.  
  674.         DrawTexure(1,150,all_y+100,
  675.                     240+240*sin(temp*3.14),48+48*sin(temp*3.14),0.0,
  676.                     8,104,248,152,1,1,1,1,0.5,0.5,0);
  677.     }
  678.  
  679.     if(temp_mode >= 1){    //TimeName
  680.         if(temp_mode == 1){
  681.             temp = (time/maxtime);
  682.         }
  683.         else{
  684.             temp = 1;
  685.         }
  686.  
  687.         DrawTexure(1,150,all_y+160,
  688.                     120+120*sin(temp*3.14),48+48*sin(temp*3.14),0.0,
  689.                     8,8,128,56,1,1,1,1,0.5,0.5,0);
  690.     }
  691.     if(temp_mode >= 2){    //ItemName
  692.         if(temp_mode == 2){
  693.             temp = (time/maxtime);
  694.         }
  695.         else{
  696.             temp = 1;
  697.         }
  698.  
  699.         DrawTexure(1,150,all_y+220,
  700.                     120+120*sin(temp*3.14),48+48*sin(temp*3.14),0.0,
  701.                     8,56,128,56+48,1,1,1,1,0.5,0.5,0);
  702.     }
  703.     if(temp_mode >= 3){    //ContinueName
  704.         if(temp_mode == 3){
  705.             temp = (time/maxtime);
  706.         }
  707.         else{
  708.             temp = 1;
  709.         }
  710.  
  711.         DrawTexure(1,150,all_y+280,
  712.                     120+120*sin(temp*3.14),48+48*sin(temp*3.14),0.0,
  713.                     8,160,128,160+48,1,1,1,1,0.5,0.5,0);
  714.     }
  715.  
  716.     if(temp_mode >= 4){    //Time
  717.         //min
  718.         if(time_m<10){
  719.             DrawText_Int(150+100+24,all_y+160-24,time_m,col,col,col,48);
  720.         }
  721.         else{
  722.             DrawText_Int(150+100,all_y+160-24,time_m,col,col,col,48);
  723.         }
  724.         //:
  725.         DrawText_Int(150+100+48,all_y+160-24,":",col,col,col,48);
  726.         //sec
  727.         if(time_s<10){
  728.             DrawText_Int(150+100+48+48,all_y+160-24,time_s,col,col,col,48);
  729.             DrawText_Int(150+100+48+24,all_y+160-24,0,col,col,col,48);
  730.         }
  731.         else{
  732.             DrawText_Int(150+100+48+24,all_y+160-24,time_s,col,col,col,48);
  733.         }
  734.     }
  735.     if(temp_mode >= 5){    //Item
  736.         //get
  737.         if(GetData("coin_count")<10){
  738.             DrawText_Int(150+100+24,all_y+220-24,GetData("coin_count"),col,col,col,48);
  739.             DrawText_Int(150+100,all_y+220-24,0,col,col,col,48);
  740.         }
  741.         else{
  742.             DrawText_Int(150+100,all_y+220-24,GetData("coin_count"),col,col,col,48);
  743.         }
  744.         //:
  745.         DrawText(150+100+48,all_y+220-24,"/",col,col,col,48);
  746.         //
  747.         if(GetData("max_coin_count")<10){
  748.             DrawText_Int(150+100+48+48,all_y+220-24,GetData("max_coin_count"),col,col,col,48);
  749.             DrawText_Int(150+100+48+24,all_y+220-24,0,col,col,col,48);
  750.         }
  751.         else{
  752.             DrawText_Int(150+100+48+24,all_y+220-24,GetData("max_coin_count"),col,col,col,48);
  753.         }
  754.     }
  755.     if(temp_mode >= 6){    //Continue
  756.         DrawText_Int(150+100+24,all_y+280-24,GetData("continue_count"),col,col,col,48);
  757.     }
  758.  
  759.     if(temp_mode >= 7){    //Rank
  760.         if(temp_mode == 7){
  761.             temp = 1.0-(time/maxtime);
  762.         }
  763.         else{
  764.             temp = 0;
  765.         }
  766.         switch(total_rank){
  767.             case 3:
  768.                 DrawTexure(2,320,360+all_y,256*2+256*temp,32*2+32*temp,temp*360*2,
  769.                             0,8,256,8+32,1,1,1,1,0.5,0.5,1);
  770.             break;
  771.             case 4:
  772.                 DrawTexure(2,320,360+all_y,256*2+256*temp,32*2+32*temp,temp*360*2,
  773.                             0,56,256,56+32,1,1,1,1,0.5,0.5,1);
  774.             break;
  775.             case 5:
  776.                 DrawTexure(2,320,360+all_y,256*2+256*temp,32*2+32*temp,temp*360*2,
  777.                             0,104,256,104+32,1,1,1,1,0.5,0.5,1);
  778.             break;
  779.             case 6:
  780.                 DrawTexure(2,320,360+all_y,256*2+256*temp,32*2+32*temp,temp*360*2,
  781.                             0,152,256,152+32,1,1,1,1,0.5,0.5,1);
  782.             break;
  783.  
  784.             case 0:
  785.                 DrawTexure(2,320,360+all_y,256*2+256*temp,32*2+32*temp,temp*360*2,
  786.                             0,8,256,8+32,1,1,1,1,0.5,0.5,1);
  787.             break;
  788.             case 1:
  789.                 DrawTexure(2,320,360+all_y,256*2+256*temp,32*2+32*temp,temp*360*2,
  790.                             0,56,256,56+32,1,1,1,1,0.5,0.5,1);
  791.             break;
  792.             case 2:
  793.                 DrawTexure(2,320,360+all_y,256*2+256*temp,32*2+32*temp,temp*360*2,
  794.                             0,104,256,104+32,1,1,1,1,0.5,0.5,1);
  795.             break;
  796.         }
  797.     }
  798.  
  799.     if(temp_mode >= 9){
  800.         if(temp_mode==9){
  801.             temp = time/maxtime;
  802.         }
  803.         else{
  804.             temp = 1.0;
  805.         }
  806.         DrawTexure(9,320,240,650,490,0,
  807.                     0,0,256,256,0,0,0,temp,0.5,0.5,1);
  808.     }
  809. }
  810.  
  811. function Roll()
  812. {
  813.     switch(temp_mode){
  814.         case 0:
  815.             maxtime = 180;
  816.  
  817.             if(time==1){
  818.                 PlayMidi("ending\tamsi09.mid");
  819.             }
  820.  
  821.             temp = sin((time/maxtime)*3.14)*255;
  822.             if(temp>=255){
  823.                 temp=255;
  824.             }
  825.  
  826.             text_x = 320-(50*12)*0.5;
  827.             text_y = 240-25;
  828.             DrawText(text_x,text_y,"âpâôé╞é╙é▐é╙é▐é╞âÅâ^âVüB",temp,temp,temp,50);
  829.  
  830.             if(time>=maxtime){
  831.                 time = 0;
  832.                 mode = mode+1;
  833.             }
  834.         break;
  835.         case 1:
  836.             maxtime = 300;
  837.  
  838.             temp = sin((time/maxtime)*3.14)*255;
  839.             if(temp>=255){
  840.                 temp=255;
  841.             }
  842.  
  843.             text_x = 320-(25*6)*0.5;
  844.             text_y = 20;
  845.             DrawText(text_x,text_y,"-âvâìâOâëâÇ-",255,255,255,25);
  846.  
  847.             text_x = 320-(25*4)*0.5;
  848.             text_y = 100;
  849.             DrawText(text_x,text_y,"é⌐é║é╦é┬",temp,temp,temp,25);
  850.  
  851.             if(time>=maxtime){
  852.                 time = 0;
  853.                 mode = mode+1;
  854.             }
  855.         break;
  856.         case 2:
  857.             maxtime = 300;
  858.  
  859.             temp = sin((time/maxtime)*3.14)*255;
  860.             if(temp>=255){
  861.                 temp=255;
  862.             }
  863.  
  864.             text_x = 320-(25*7)*0.5;
  865.             text_y = 20;
  866.             DrawText(text_x,text_y,"-âOâëâtâBâbâN-",255,255,255,25);
  867.  
  868.             text_x = 320-(25*4)*0.5;
  869.             text_y = 100;
  870.             DrawText(text_x,text_y,"é⌐é║é╦é┬",temp,temp,temp,25);
  871.  
  872.             text_x = 320-(25*3)*0.5;
  873.             text_y += 40;
  874.             DrawText(text_x,text_y,"éαé┴é┐",temp,temp,temp,25);
  875.  
  876.             if(time>=maxtime){
  877.                 time = 0;
  878.                 mode = mode+1;
  879.             }
  880.         break;
  881.         case 3:
  882.             maxtime = 300;
  883.  
  884.             temp = sin((time/maxtime)*3.14)*255;
  885.             if(temp>=255){
  886.                 temp=255;
  887.             }
  888.  
  889.             text_x = 320-(25*7)*0.5;
  890.             text_y = 20;
  891.             DrawText(text_x,text_y,"-âOâëâtâBâbâN-",255,255,255,25);
  892.  
  893.             text_x = 320-(25*13)*0.5;
  894.             text_y = 45;
  895.             DrawText(text_x,text_y,"âtâèü[æfì▐é≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  896.  
  897.             text_x = 320-(25*16)*0.5;
  898.             text_y = 100;
  899.             DrawText(text_x,text_y,"Handshakeüigodhandevillegé│é±üj",temp,temp,temp,25);
  900.  
  901.             if(time>=maxtime){
  902.                 time = 0;
  903.                 mode = mode+1;
  904.             }
  905.         break;
  906.         case 4:
  907.             maxtime = 300;
  908.  
  909.             temp = sin((time/maxtime)*3.14)*255;
  910.             if(temp>=255){
  911.                 temp=255;
  912.             }
  913.  
  914.             text_x = 320-(25*7)*0.5;
  915.             text_y = 20;
  916.             DrawText(text_x,text_y,"-âOâëâtâBâbâN-",255,255,255,25);
  917.  
  918.             text_x = 320-(25*13)*0.5;
  919.             text_y = 45;
  920.             DrawText(text_x,text_y,"âtâèü[æfì▐é≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  921.  
  922.             text_x = 320-(25*13)*0.5;
  923.             text_y = 100;
  924.             DrawText(text_x,text_y,"é╜é⌐éτÅæû[üié╜é⌐éτé╡é│é±üj",temp,temp,temp,25);
  925.  
  926.             if(time>=maxtime){
  927.                 time = 0;
  928.                 mode = mode+1;
  929.             }
  930.         break;
  931.         case 5:
  932.             maxtime = 300;
  933.  
  934.             temp = sin((time/maxtime)*3.14)*255;
  935.             if(temp>=255){
  936.                 temp=255;
  937.             }
  938.  
  939.             text_x = 320-(25*7)*0.5;
  940.             text_y = 20;
  941.             DrawText(text_x,text_y,"-âOâëâtâBâbâN-",255,255,255,25);
  942.  
  943.             text_x = 320-(25*13)*0.5;
  944.             text_y = 45;
  945.             DrawText(text_x,text_y,"âtâèü[æfì▐é≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  946.  
  947.             text_x = 320-(25*20)*0.5;
  948.             text_y = 100;
  949.             DrawText(text_x,text_y,"FirstSeedMatrialüiFirstSeedMatrialé│é±üj",temp,temp,temp,25);
  950.  
  951.             if(time>=maxtime){
  952.                 time = 0;
  953.                 mode = mode+1;
  954.             }
  955.         break;
  956.         case 6:
  957.             maxtime = 300;
  958.  
  959.             temp = sin((time/maxtime)*3.14)*255;
  960.             if(temp>=255){
  961.                 temp=255;
  962.             }
  963.  
  964.             text_x = 320-(25*7)*0.5;
  965.             text_y = 20;
  966.             DrawText(text_x,text_y,"-âOâëâtâBâbâN-",255,255,255,25);
  967.  
  968.             text_x = 320-(25*13)*0.5;
  969.             text_y = 45;
  970.             DrawText(text_x,text_y,"âtâèü[æfì▐é≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  971.  
  972.             text_x = 320-(25*13)*0.5;
  973.             text_y = 100;
  974.             DrawText(text_x,text_y,"öwîiæfì▐ôXüiôⁿì]é│é│é│é±üj",temp,temp,temp,25);
  975.  
  976.             if(time>=maxtime){
  977.                 time = 0;
  978.                 mode = mode+1;
  979.             }
  980.         break;
  981.         case 7:
  982.             maxtime = 300;
  983.  
  984.             temp = sin((time/maxtime)*3.14)*255;
  985.             if(temp>=255){
  986.                 temp=255;
  987.             }
  988.  
  989.             text_x = 320-(25*7)*0.5;
  990.             text_y = 20;
  991.             DrawText(text_x,text_y,"-âOâëâtâBâbâN-",255,255,255,25);
  992.  
  993.             text_x = 320-(25*13)*0.5;
  994.             text_y = 45;
  995.             DrawText(text_x,text_y,"âtâèü[æfì▐é≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  996.  
  997.             text_x = 320-(25*22)*0.5;
  998.             text_y = 100;
  999.             DrawText(text_x,text_y,"ÄΦÅæé½âtâHâôâgüwé½éδÄÜüxüikiloüié½éδüjé│é±üj",temp,temp,temp,25);
  1000.  
  1001.             if(time>=maxtime){
  1002.                 time = 0;
  1003.                 mode = mode+1;
  1004.             }
  1005.         break;
  1006.  
  1007.         case 8:
  1008.             maxtime = 300;
  1009.  
  1010.             temp = sin((time/maxtime)*3.14)*255;
  1011.             if(temp>=255){
  1012.                 temp=255;
  1013.             }
  1014.  
  1015.             text_x = 320-(25*3)*0.5;
  1016.             text_y = 20;
  1017.             DrawText(text_x,text_y,"-ë╣èy-",255,255,255,25);
  1018.  
  1019.             text_x = 320-(25*13)*0.5;
  1020.             text_y = 45;
  1021.             DrawText(text_x,text_y,"âtâèü[æfì▐é≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  1022.  
  1023.             text_x = 320-(25*17)*0.5;
  1024.             text_y = 100;
  1025.             DrawText(text_x,text_y,"TAM Music Factoryüiæ╜û▓(TAM)é│é±üj",temp,temp,temp,25);
  1026.  
  1027.             if(time>=maxtime){
  1028.                 time = 0;
  1029.                 mode = mode+1;
  1030.             }
  1031.         break;
  1032.         case 9:
  1033.             maxtime = 300;
  1034.  
  1035.             temp = sin((time/maxtime)*3.14)*255;
  1036.             if(temp>=255){
  1037.                 temp=255;
  1038.             }
  1039.  
  1040.             text_x = 320-(25*4)*0.5;
  1041.             text_y = 20;
  1042.             DrawText(text_x,text_y,"-î°ë╩ë╣-",255,255,255,25);
  1043.  
  1044.             text_x = 320-(25*17)*0.5;
  1045.             text_y = 45;
  1046.             DrawText(text_x,text_y,"âtâèü[æfì▐üAæfì▐ÅWé≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  1047.  
  1048.             text_x = 320-(25*16)*0.5;
  1049.             text_y = 100;
  1050.             DrawText(text_x,text_y,"âUüEâ}âbâ`âüâCâJâ@âYüiOSAé│é±üj",temp,temp,temp,25);
  1051.  
  1052.             if(time>=maxtime){
  1053.                 time = 0;
  1054.                 mode = mode+1;
  1055.             }
  1056.         break;
  1057.         case 10:
  1058.             maxtime = 300;
  1059.  
  1060.             temp = sin((time/maxtime)*3.14)*255;
  1061.             if(temp>=255){
  1062.                 temp=255;
  1063.             }
  1064.  
  1065.             text_x = 320-(25*4)*0.5;
  1066.             text_y = 20;
  1067.             DrawText(text_x,text_y,"-î°ë╩ë╣-",255,255,255,25);
  1068.  
  1069.             text_x = 320-(25*17)*0.5;
  1070.             text_y = 45;
  1071.             DrawText(text_x,text_y,"âtâèü[æfì▐üAæfì▐ÅWé≡Ägùpé╡é─éóé▄é╖",255,255,255,25);
  1072.  
  1073.             text_x = 320-(25*14)*0.5;
  1074.             text_y = 100;
  1075.             DrawText(text_x,text_y,"ë╣üEĽôTüiâfü[â^âNâëâtâgÄ╨üj",temp,temp,temp,25);
  1076.  
  1077.             if(time>=maxtime){
  1078.                 time = 0;
  1079.                 mode = mode+1;
  1080.             }
  1081.         break;
  1082.         case 11:
  1083.             maxtime = 100;
  1084.  
  1085.             temp = (1.0-(time/maxtime))*255;
  1086.             if(temp>=255){
  1087.                 temp=255;
  1088.             }
  1089.  
  1090.             text_x = 320-(25*4)*0.5;
  1091.             text_y = 20;
  1092.             DrawText(text_x,text_y,"-î°ë╩ë╣-",temp,temp,temp,25);
  1093.  
  1094.             text_x = 320-(25*17)*0.5;
  1095.             text_y = 45;
  1096.             DrawText(text_x,text_y,"âtâèü[æfì▐üAæfì▐ÅWé≡Ägùpé╡é─éóé▄é╖",temp,temp,temp,25);
  1097.  
  1098.             if(time>=maxtime){
  1099.                 time = 0;
  1100.                 mode = mode+1;
  1101.                 FeedOutMidi(1000);
  1102.             }
  1103.         break;
  1104.  
  1105.         case 12:
  1106.             maxtime = 300;
  1107.  
  1108.             temp = sin((time/maxtime)*3.14)*255;
  1109.             if(temp>=255){
  1110.                 temp=255;
  1111.             }
  1112.  
  1113.             text_x = 630-(20*15);
  1114.             text_y = 450;
  1115.             DrawText(text_x,text_y,"2006 (C)éτé¡é╛Factory",temp,temp,temp,20);
  1116.  
  1117.             if(time>=maxtime){
  1118.                 time = 0;
  1119.                 mode = temp_modeend;
  1120.             }
  1121.         break;
  1122.     }
  1123.  
  1124. }
  1125.