home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1996 February / VPR9602A.ISO / ffilly / filly130 / skip.tfy < prev    next >
Text File  |  1995-10-30  |  3KB  |  123 lines

  1. //TOFFYシナリオのひな型
  2.  
  3. //作品情報(""内を書き換えて下さい)
  4. #info INAM "Cast Sample"
  5. #info ICMT "左クリックしてね。右クリックで終了"
  6. #info ISBJ "スキップ冬里ちゃん"
  7. #info IART "ともゆん"
  8. #info ICOP "ともゆん"
  9. #info ICOP "(c)Tomoyuki.Uchida"
  10. #info VIDO "640x400; 256"
  11. #info GRPC "Tomoyuki,SDI00687@niftyserve.or.jp"
  12.  
  13.  
  14. int musi_pic, tatumaki_pic, skip_pic, base_pic; //このようにグローバルに取らないと各関数から見えなくなります
  15.  
  16. //シナリオ本体
  17. main(){
  18. //ここからシナリオを書き始めて下さい
  19.  
  20.  
  21. LoadPic("yun_245.bmp");//背景を読み込みまーす
  22.  
  23. OpenWin(base_pic=CreatePic(0),0,0,WinInfo(0)-2,WinInfo(1)-2,-(WinInfo(0)-480)/2,-(WinInfo(1)-360)/2);//背景と同じサイズのピクチャーを生成(中は汚いけどね(^^;)
  24. PutCast(0,base_pic,0,0);//背景を設定(透明色は無しモード)
  25.  
  26. musi_pic=LoadPic("tb.bmp");//虫さんキャスト元データ
  27. tatumaki_pic=LoadPic("tb2.bmp");//竜巻
  28. skip_pic=LoadPic("skip.bmp");//スキップ
  29.  
  30. mes(LBDOWN){
  31.     PlayWAVE("pom.wav");
  32.     i=Random(3);
  33.     if(i==0){
  34.         Skip();//マウスクリックでスキップ始め
  35.     }else{
  36.         if(i==1){
  37.             Musi();//マウスクリックで虫始め
  38.         }else{
  39.             Tatumaki();//マウスクリックで竜巻始め
  40.         }
  41.     }
  42. }
  43.  
  44. //ここまでに書いてください
  45. }
  46.  
  47. Skip()
  48. {
  49.  int skip_cast, xpos, ypos;
  50.  xpos=MesP2-50;
  51.  ypos=MesP3-100;
  52.  skip_cast = PutCast( skip_pic, base_pic, xpos, ypos, 0xffffff, 0, 0, 1, 104,195, 0, 0 );//0xffffは背景色の白色
  53.  mes(TIME){
  54.     step( 4 ) {
  55.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 0,0 ); ,
  56.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 104,0 ); ,
  57.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 208,0 ); ,
  58.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 312,0 ); ,
  59.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 416,0 ); ,
  60.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 0,200 ); ,
  61.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 104,200 ); ,
  62.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 208,200 ); ,
  63.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 312,200 ); ,
  64.     MoveCast( skip_cast, skip_pic, xpos, ypos, 0, 104, 195, 416,200 ); 
  65.     }
  66.     step(100){,
  67.     DelCast(skip_cast);
  68.     del_me; 
  69.     }
  70.     step(4){
  71.     xpos=xpos+Random(5)-25;
  72.     ypos=ypos+Random(5)-5;
  73.     if(xpos<-50||ypos<-100){
  74.         DelCast(skip_cast);
  75.         del_me; 
  76.     }
  77.  
  78.     }
  79.  }
  80. }
  81.  
  82. Musi()
  83. {
  84.  int musi_cast, xpos, ypos;
  85.  xpos=MesP2-50;
  86.  ypos=MesP3-50;
  87.  musi_cast = PutCast( musi_pic, base_pic, xpos, ypos, 0xffffff );//0xffffffは背景色の白色
  88.  mes(TIME){
  89.     step( 4 ) {
  90.     MoveCast( musi_cast, musi_pic, xpos, ypos );
  91.     xpos=xpos+Random(50)-25;
  92.     if(xpos<0||xpos>=590)xpos=Random(590);
  93.     ypos=ypos+Random(50)-25;
  94.     if(ypos<0||ypos>=350)ypos=Random(300);
  95.     }
  96.     step(100){,
  97.     DelCast(musi_cast);
  98.     del_me;
  99.     }
  100.  }
  101. }
  102.  
  103. Tatumaki()
  104. {
  105.  int tatumaki_cast, xpos, ypos;
  106.  xpos=MesP2-50;
  107.  ypos=MesP3-50;
  108.  tatumaki_cast = PutCast( tatumaki_pic, base_pic, xpos, ypos, 0xffffff );//0xffffffは背景色の白色
  109.  mes(TIME){
  110.     step( 4 ) {
  111.     MoveCast( tatumaki_cast, tatumaki_pic, xpos, ypos );
  112.     xpos=xpos+Random(30)-15;
  113.     if(xpos<=50||xpos>=590)xpos=Random(590);
  114.     ypos=ypos+Random(30)-15;
  115.     if(ypos<=50||ypos>=350)ypos=Random(300);
  116.     }
  117.     step(100){,
  118.     DelCast(tatumaki_cast);
  119.     del_me;
  120.     }
  121.  }
  122. }
  123.