home *** CD-ROM | disk | FTP | other *** search
/ ring.yamanashi.ac.jp/pub/pc/freem/action/ / action.zip / panhumu121.zip / panhumu121 / game / script / opening.dat < prev    next >
Text File  |  2006-04-05  |  5KB  |  206 lines

  1. //http://shass.sakura.ne.jp/
  2. //öwîiæfì▐ôX
  3. //
  4. //MIDI
  5. //TAM Music Factoryüiæ╜û▓(TAM)é│é±üj
  6. //http://www.tam-music.com/index.html
  7.  
  8. //Åëè·ë╗è╓Éö
  9. function OnInit()
  10. {
  11.     new("isPushButton1",1);
  12.  
  13.     new("mode",0);
  14.     new("time",0);
  15.     new("maxtime",0);
  16.  
  17.     new("all_y",0);
  18.     new("text_x",10);
  19.     new("text_y",440);
  20.  
  21.     LoadTexure("data\opening\map.bmp",0);
  22.     LoadTexure("data\opening\chara.bmp",1);
  23.     LoadTexure("data\opening\cat.bmp",2);
  24.     LoadTexure("data\opening\cat2.bmp",3);
  25.  
  26.     //LoadMidi
  27.     PlayMidi("opening\tam-n05.mid",6*1000);
  28.  
  29.     //LoadWave
  30.     LoadWave(0,"etc\hit_s11_b.wav");
  31.     LoadWave(1,"etc\pi78.wav");
  32.     LoadWave(2,"etc\fall06.wav");
  33. }
  34.  
  35. function OnProc()
  36. {
  37.     if(GetKeyData("isButton1") == 1){
  38.         if(isPushButton1 <= 0){
  39.             SetData("next","char","1");
  40.         }
  41.         isPushButton1 = 1;
  42.     }
  43.     else{
  44.         isPushButton1 = 0;
  45.     }
  46.  
  47.     DrawTexure(0,0,all_y,640,480,0.0,0,0,512,384,1,1,1,1,0,0,0);
  48.  
  49.     time += 1;
  50.  
  51.     switch(mode)
  52.     {
  53.         case 0:
  54.             maxtime = 120;
  55.             DrawTexure(1,300,all_y,128*2,256*2,0.0,128,0,256,256,1,1,1,1,0,0,0);
  56.             DrawText(text_x,all_y+text_y,"éñü`é±üEüEüEù[ö╤é═ë╜ÉHé╫éµéñé⌐é╚üEüEüE",255,255,255,25);
  57.             if(time>=maxtime){
  58.                 time = 0;
  59.                 mode = 2;
  60.             }
  61.         break;
  62.  
  63.         case 2:
  64.             maxtime = 120;
  65.             DrawTexure(1,300,all_y,128*2,256*2,0.0,128,0,256,256,1,1,1,1,0,0,0);
  66.             DrawText(text_x,all_y+text_y,"é±üH",255,255,255,25);
  67.             if(time>=maxtime){
  68.                 time = 0;
  69.                 mode = 4;
  70.             }
  71.         break;
  72.  
  73.         case 4:
  74.             maxtime = 120;
  75.             DrawTexure(1,300,all_y,128*2,256*2,0.0,128,0,256,256,1,1,1,1,0,0,0);
  76.             DrawTexure(3,300,250,152*1.5,216*1.5,345.0,8,8,160,224,1,1,1,1,0.5,0.5,1);//é┐éτé╡
  77.             DrawText(text_x,all_y+text_y,"é▒é╠â`âëâVé═üEüEüE",255,255,255,25);
  78.             if(time>=maxtime){
  79.                 time = 0;
  80.                 mode = 6;
  81.             }
  82.         break;
  83.  
  84.         case 6:
  85.             maxtime = 180;
  86.             DrawTexure(1,300,all_y,128*2,256*2,0.0,128,0,256,256,1,1,1,1,0,0,0);
  87.             DrawText(text_x,all_y+text_y,"é╗éñé╛üIé▒éΩé╔é╡éµéñüI",255,255,255,25);
  88.             if(time>=maxtime){
  89.                 time = 0;
  90.                 mode = 10;
  91.             }
  92.         break;
  93.  
  94.         case 10:
  95.             maxtime = 120;
  96.             DrawTexure(1,300,all_y,128*2,256*2,0.0,128,0,256,256,1,1,1,1,0,0,0);
  97.             DrawText(text_x,all_y+text_y,"é═éΓé¡ìsé⌐é╚éóé╞é¿ôXé¬é╡é▄é┴é┐éßüEüEüE",255,255,255,25);
  98.             if(time>=maxtime){
  99.                 time = 0;
  100.                 mode = 11;
  101.             }
  102.         break;
  103.  
  104.         case 11:
  105.             maxtime = 120;
  106.             DrawTexure(1,300,all_y,128*2,256*2,0.0,128,0,256,256,1,1,1,1,0,0,0);
  107.             DrawTexure(2,320,240,80,96,0.0, 416,16,496,112,1,1,1,1,0.5,0.5,0);
  108.             DrawText(text_x,all_y+text_y,"éñé┴üIüH",255,255,255,25);
  109.             if(time>=maxtime){
  110.                 time = 0;
  111.                 mode = 12;
  112.                 PlayWave(0);
  113.             }
  114.         break;
  115.  
  116.         case 12:
  117.             maxtime = 50;
  118.             all_y = sin((time/maxtime)*3.14*6.0)*(50.0*(1.0-(time/maxtime)));
  119.             DrawTexure(2,320,all_y+240,384,174,0.0, 16,16,400,192,1,1,1,1,0.5,0.5,0);
  120.             if(time>=maxtime){
  121.                 time = 0;
  122.                 mode = 13;
  123.                 all_y = 0;
  124.             }
  125.         break;
  126.  
  127.         case 13:
  128.             maxtime = 120;
  129.             DrawTexure(2,320,240,384,174,0.0, 16,16,400,192,1,1,1,1,0.5,0.5,0);
  130.             DrawText(text_x,all_y+text_y,"éóé┴é╜éƒü`",255,255,255,25);
  131.             if(time>=maxtime){
  132.                 time = 0;
  133.                 mode = 14;
  134.                 all_y = 0;
  135.             }
  136.         break;
  137.  
  138.         case 14:
  139.             maxtime = 100;
  140.             DrawTexure(2,320,240,160,128,0.0, 16,208,176,336,1,1,1,1,0.5,0.5,0);
  141.             DrawText(text_x,all_y+text_y,"é¿é⌐é╦é¬éƒü`",255,255,255,25);
  142.             if(time>=maxtime){
  143.                 time = 0;
  144.                 mode = 15;
  145.                 all_y = 0;
  146.                 PlayWave(1);
  147.             }
  148.         break;
  149.  
  150.         case 15:
  151.             maxtime = 60;
  152.             DrawTexure(2,320,240,160,128,0.0, 192,208,352,336,1,1,1,1,0.5,0.5,0);
  153.             DrawText(text_x,all_y+text_y,"üIüI",255,255,255,25);
  154.             if(time>=maxtime){
  155.                 time = 0;
  156.                 mode = 16;
  157.                 all_y = 0;
  158.             }
  159.         break;
  160.  
  161.         case 16:
  162.             maxtime = 120;
  163.             DrawTexure(2,320,240,208,128,0.0, 16,352,224,480,1,1,1,1,0.5,0.5,0);
  164.             DrawText(text_x,all_y+text_y,"üEüEüE",255,255,255,25);
  165.             if(time>=maxtime){
  166.                 time = 0;
  167.                 mode = 17;
  168.                 all_y = 0;
  169.                 PlayWave(2);
  170.             }
  171.         break;
  172.  
  173.         case 17:
  174.             maxtime = 120;
  175.             DrawTexure(2,320,240,208,128,0.0, 288,352,496,480,1,1,1,1,0.5,0.5,0);
  176.             DrawText(text_x,all_y+text_y,"üIüIüI",255,255,255,25);
  177.             if(time>=maxtime){
  178.                 time = 0;
  179.                 mode = 18;
  180.                 all_y = 0;
  181.             }
  182.         break;
  183.  
  184.         case 18:
  185.             maxtime = 120;
  186.             DrawTexure(1,300,all_y,128*2,256*2,0.0,0,0,128,256,1,1,1,1,0,0,0);
  187.             DrawText(text_x,all_y+text_y,"é¿üAé¿ôXé¬ò┬é▄éΘæOé╔ĵéΦû▀é│é╚é¡é┐éßüI",255,255,255,25);
  188.             if(time>=maxtime){
  189.                 time = 0;
  190.                 mode = 99;
  191.                 FeedOutMidi(1000);
  192.             }
  193.         break;
  194.  
  195.         case 99:
  196.             maxtime = 60;
  197.             DrawTexure(1,300,all_y,128*2,256*2,0.0,0,0,128,256,1,1,1,1,0,0,0);
  198.             if(time>=maxtime){
  199.                 SetData("next","char","1");
  200.             }
  201.             DrawTexure(-1,0,0,640,480,0.0, 0,0,256,256,0,0,0,time/maxtime,0,0,1);
  202.         break;
  203.     }
  204.     DrawTexure(9,0,all_y+430,640,100,0.0,0,395,256,512,0,0,0,1,0,0,1);
  205. }
  206.