home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1996 March
/
VPR9603A.ISO
/
ffilly
/
fmc03
/
fmc03.tfy
< prev
next >
Wrap
Text File
|
1995-12-20
|
8KB
|
325 lines
//fmc03.tfy
//作品情報
#info INAM "第3回 Filly Monthly Contest 入賞作品紹介Filly"
#info IART "ナナミちゃん,NBF04330@niftyserve.or.jp; WATERLOO, niftyserve.or.jp; @POCOPEN,GGB02243@niftyserve.or.jp"
#info ICOP "ナナミちゃん,NBF04330@niftyserve.or.jp; WATERLOO, niftyserve.or.jp; @POCOPEN,GGB02243@niftyserve.or.jp"
int WinW,WinH,PicW,PicH,MenuWin;
int flag,picm0,picm1,x0,y0;
//シナリオ本体
main(){
WinW=WinInfo(0);
WinH=WinInfo(1);
picm0=LoadPic("fmc03.bmp");
PicW=PicWidth(picm0);
PicH=PicHeight(picm0);
x0=(WinW-PicW)/2;
y0=(WinH-PicH)/2;
MenuWin=OpenWin(picm0,0,0,WinW,WinH,-x0,-y0,0x000000);
flag=0;
menu();
}
//メニュー
menu(){
if(flag==1){
OpenWin(picm0,0,0,WinW,WinH,-x0,-y0,0x000000);
flag==0;
}
del_all;
mes(LBDOWN){
PlayWAVE("kachi.wav");
if(MesP2>390+x0&&MesP2<607+x0&&MesP3>109+y0&&MesP3<260+y0){
mes(TIME){ShowTitle(1);del_us;del_me;}
}
if(MesP2>390+x0&&MesP2<607+x0&&MesP3>270+y0&&MesP3<422+y0){
mes(TIME){ShowTitle(2);del_us;del_me;}
}
if(MesP2>525+x0&&MesP2<619+x0&&MesP3>436+y0&&MesP3<471+y0){
mes(TIME){
step(1){
CloseWinAll();,,
del_all;,,
del_me;
}
}
}
}
}
//タイトル実行
ShowTitle(int index){
int pict1,x1,y1;
if(index==1){
pict1=LoadPic("wfn_001.256");
x1=(WinW-PicWidth(pict1))/2;
y1=(WinH-PicHeight(pict1))/2;
OpenWin(pict1,0,0,WinW,WinH,-x1,-y1,0x000000);
mes(LBDOWN){
PlayWAVE("kachi.wav");
DelPic(pict1);
mes(TIME){flag=1;menu();del_me;}
}
}
if(index==2){
mes(TIME){hitoha();del_me;}
}
}
//TOFFYシナリオのひな型
//作品情報(""内を書き換えて下さい)
/*#info INAM "まるちめでぃあ★てきすと"
#info ISBJ "文芸を手軽にタイトルに、、、"
#info VIDO "640x480,256色"
#info WRIT "ともゆん"
#info ICOP "ともゆん"
*/
int Win_No, Back_Pic,FontSize,BaseX,BaseY, BlackPic,IsInPage,CPic, MaxPage, Page[], Sect[], MaxSect,base_pic_x, base_pic_y,PicLeft,PicTop;
str BaseFont, IniName, Title[];
//シナリオ本体
hitoha(){
//ここからシナリオを書き始めて下さい
int i, j;
int BackPic;
str TmpStr;
IniName="hitoha_m.ini"; //////////////////////////////////////読み込みファイル名指定
BlackPic=LoadPic("black.bmp");//フェードイン用背景を読み込みまーす
CPic=CreatePic(BlackPic);
MovePic(BlackPic,0,0,640,480,CPic,0,0);
base_pic_x=PicWidth(BlackPic);
base_pic_y=PicHeight(BlackPic);
PicLeft=(WinInfo(0)-base_pic_x)/2-1;
// PicRight=(WinInfo(0)+base_pic_x)/2-1;
PicTop=(WinInfo(1)-base_pic_y)/2-1;
// PicBottom=(WinInfo(1)+base_pic_y)/2-1;
CapTitle(""); //ウィンドウの上のキャプションバーを消します。
OpenWin(CPic,
-1, //スクリーンの左上隅からちょっとだけ左
-1, //スクリーンの左上隅からちょっとだけ上 (ウィンドウの枠を消したいので)
WinInfo(0), //スクリーンの横幅と同じ大きさのサイズ
WinInfo(1), //縦の高さのサイズ
-PicLeft+1, //ピクチャーの表示を画面の中央に、、、
-PicTop+1, //同じく
0); //バックグラウンドを黒に
BaseFont =GetIniStr("system","basefont","MS 明朝",IniName);
FontSize=GetIniInt("system","fontsize",16,IniName);
BaseX=GetIniInt("system","startx", 38,IniName);
BaseY=GetIniInt("system","starty", 84,IniName);
j=0; Title[0]=" "; Sect[0]=1;
for(i=1;GetIniStr(StrPrint("Page%ld",i),"Text1","/E",IniName)!="/E";i=i+1){
if((TmpStr=GetIniStr(StrPrint("Page%ld",i),"Title","/E",IniName))!="/E"){
j=j+1;
Sect[j]=i;
Title[j]=TmpStr;
}
Page[i]=j;
}
MaxPage=i-1;
MaxSect=j;
IsInPage=0;//背景がページモードなら1
Opening();
//ここまでに書いてください
}
Opening()
{
int Pic_No;
Pic_No=LoadPic(GetIniStr("system","startpic","open.bmp",IniName));
// MovePic(BlackPic,0,0,640,480,CPic,0,0);
// MoveWin(Win_No,CPic);
MovePic(Pic_No,0,0,640,480,CPic,0,0,2,20);
mes(LBDOWN){
if(MesP3>(392+PicTop)&&MesP3<(427+PicTop)){
if(MesP2>497+PicLeft&&MesP2<532+PicLeft){
PlayWAVE("kachi.wav");
WritePage(1);
DelPic(Pic_No);
del_me;
/* }else{
if(MesP2>451+PicLeft&&MesP2<485+PicLeft){
PlayWAVE("kachi.wav");
Prof();
DelPic(Pic_No);
del_me;*/
}else{
if(MesP2>544+PicLeft&&MesP2<579+PicLeft){
BackMode(1);
TextColor(255,255,255);
SetFont( 80, "Times New Roman", 0, 0, 0, 0, 800,1 ,0,0,0,0,0,2,1);
TextWrite("Fin.",BlackPic,260,180);
MovePic(BlackPic,0,0,640,480,CPic,0,0,3,20);
mes(TIME){step(30){,
DelPic(Pic_No);
// CloseWinAll();
del_all;
flag=1;
menu();
del_me;
}}
del_me;
}
// }
}
}
PlayWAVE("shuu.wav");
}
}
/*
Prof()
{
int Pic_No;
Pic_No=LoadPic(GetIniStr("system","profpic","prof.bmp",IniName));
MovePic(Pic_No,0,0,640,480,CPic,0,0,2,20);
mes(LBDOWN){
if(MesP3>414+PicTop&&MesP3<446+PicTop&&MesP2>590+PicLeft&&MesP2<622+PicLeft){
PlayWAVE("kachi.wav");
Opening();
DelPic(Pic_No);
del_me;
}
PlayWAVE("shuu.wav");
}
}
*/
WritePage(int PageNo)
{
str sect,text;
int x,y,i,Tmp,p;
if(IsInPage!=1){
Back_Pic=LoadPic(GetIniStr("system","backpic","back.bmp",IniName));
}
Tmp=CreatePic(Back_Pic);
MovePic(Back_Pic,0,0,640,480,Tmp,0,0);
sect=StrPrint("Page%ld",PageNo);
x=GetIniInt(sect, "startx", BaseX,IniName);
y=GetIniInt(sect, "starty", BaseY,IniName);
BackMode(1);
SetFont( 24, "MS ゴシック", 128, 0, 0, 0, 800 );
TextColor(0,0,0);
TextWrite(Title[Page[PageNo]],Tmp,61,21);
TextColor(0,0,255);
TextWrite(Title[Page[PageNo]],Tmp,60,20);
SetFont( 20, "MS 明朝", 128, 0, 0, 0, 400 );
TextColor(0,0,0);
TextWrite(StrPrint("P.%ld",PageNo),Tmp,511,24);
TextColor(255,0,0);
TextWrite(StrPrint("P.%ld",PageNo),Tmp,510,23);
TextColor(0,0,95);
SetFont(GetIniInt(sect,"fontsize",FontSize,IniName),GetIniInt(sect,"fontname",BaseFont,IniName),128, 0, 0, 0, 400);
if((text=GetIniStr(sect,"wave","/E",IniName))!="/E"){PlayWAVE(text);}
if((text=GetIniStr(sect,"midi","/E",IniName))!="/E"){PlayMIDI(text);}
for(i=1;(text=GetIniStr(sect,StrPrint("Pic%ld",i),"/E",IniName))!="/E";i=i+1){
p=LoadPic(text);
MovePic(p,0,0,PicWidth(p),PicHeight(p),Tmp,GetIniInt(sect,StrPrint("Pic%ldx",i),27,IniName),GetIniInt(sect,StrPrint("Pic%ldy",i),73,IniName));
DelPic(p);
}
for(i=1;(text=GetIniStr(sect,StrPrint("Text%ld",i),"/E",IniName))!="/E";i=i+1){
if(StrFind(text,"/EM")==0){
TextColor(0,0,0);
SetFont( GetIniInt(sect,"fontsize",FontSize,IniName)+4, "MS ゴシック", 128, 0, 0, 0, 800 );
TextWrite(SubStr(text,3,StrLen(text)-3),Tmp,x+1,y-1);
TextColor(0,50,200);
//SetFont( GetIniInt(sect,"fontsize",FontSize,IniName)+4, "MS ゴシック", 128, 0, 0, 0, 800 );
TextWrite(SubStr(text,3,StrLen(text)-3),Tmp,x,y-2);
y=y+4;
TextColor(0,0,95);
SetFont(GetIniInt(sect,"fontsize",FontSize,IniName),GetIniInt(sect,"fontname",BaseFont,IniName),128, 0, 0, 0, 400);
}else{
TextWrite(text,Tmp,x,y);
}
y=y+FontSize+3;
}
if(IsInPage!=1){
MovePic(Tmp,0,0,640,480,CPic,0,0,2,20);
mes(TIME){step(200){,,,,,,DelPic(Tmp);del_me;}}
IsInPage=1;
}else{
MovePic(Tmp,0,0,640,480,CPic,0,0);
DelPic(Tmp);
}
mes(LBDOWN){
if(MesP2>590+PicLeft&&MesP2<622+PicLeft){
if(MesP3>84+PicTop&&MesP3<141+PicTop){
if(Page[PageNo]<=0){
goto Endmes;
}
PlayWAVE("pachi.wav");
PageNo=Sect[Page[PageNo]-1];
WritePage(PageNo);
del_me;
}else{
if(MesP3>162+PicTop&&MesP3<218+PicTop){
if(PageNo<=1){
goto Endmes;
}
PlayWAVE("pachi.wav");
PageNo=PageNo-1;
WritePage(PageNo);
del_me;
}else{
if(MesP3>257+PicTop&&MesP3<312+PicTop){
if(PageNo>=MaxPage){
goto Endmes;
}
PlayWAVE("pachi.wav");
PageNo=PageNo+1;
WritePage(PageNo);
del_me;
}else{
if(MesP3>335+PicTop&&MesP3<390+PicTop){
if(Page[PageNo]>=MaxSect){
goto Endmes;
}
PlayWAVE("pachi.wav");
PageNo=Sect[Page[PageNo]+1];
WritePage(PageNo);
del_me;
}else{
if(MesP3>414+PicTop&&MesP3<446+PicTop){
PlayWAVE("kachi.wav");
Opening();
DelPic(Back_Pic);
IsInPage=0;
del_me;
}
}
}
}
}
}
Endmes:;
PlayWAVE("shuu.wav");
}
}