home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 September
/
VPR9809A.ISO
/
FFILLY
/
Gomac017
/
autoexec.tfy
< prev
next >
Wrap
Text File
|
1998-04-21
|
5KB
|
187 lines
#info INAM "それゆけ!フィリーちゃん・びゅーわー"
#info IART "POCOPEN,GGB02243@niftyserve.or.jp;poco@yun.co.jp"
#info ICOP "POCOPEN,GGB02243@niftyserve.or.jp;poco@yun.co.jp"
int sClick;
int pic[],basePic;
int zoomPic;
int mainWin,zoomWin;
int picW,picH,picH0;
int sc,zoom;
int koma,title;
str file[];
int bgms;
str bgm;
str LF;
str name;
main(){
int backPic;
int cast,i;
LF=StrCode(0x0a);
loadIni();
sc=1;
sClick=LoadRsc("101.wav");
if(WinInfo(1)<768)sc=2;
loadPic();
playBGM();
picW=PicWidth(pic[1]);
picH=PicHeight(pic[1]);
if(title!=0)makeTitle();
picH0=PicHeight(pic[0]);
backPic=CreatePic(pic[0],picW,picH0+picH);
MoveSPic(pic[0],0,0,picW,picH0,backPic,0,0,picW,picH0);
basePic=CreatePic(backPic);
PutCast(backPic,basePic);
cast=PutCast(pic[1],basePic,0,picH0);
CapTitle(name);
mainWin=OpenWin(basePic);
showHelp();
i=1;
mes(KEY_DOWN){
if(StrCode(MesP2)=="H"){
showHelp();
}
else{
step{
zoom=1;
zoomin();
,
zoom=0;
zoomin();
}
}
}
mes(RBDBLCLK){
exit();
}
mes(LBDOWN){
i=i+1;
if(i==koma+2){
exit();
i=i-1;
}
if(i==koma+1)lastMes();
else MoveCast(cast,pic[i],0,picH0);
PlayRsc(sClick);
}
mes(RBDOWN){
i=i-1;
if(i==0){
exit();
i=i+1;
}
else MoveCast(cast,pic[i],0,picH0);
PlayRsc(sClick);
}
}
int loadPic(){
int i,pic_;
int picW_,picH_;
for(i=title;i<=koma;i=i+1){
pic_=LoadPic(file[i]);
picW_=PicWidth(pic_);
picH_=PicHeight(pic_);
pic[i]=CreatePic(pic_,picW_/sc,picH_/sc);
MoveSPic(pic_,0,0,picW_,picH_,pic[i],0,0,picW_/sc,picH_/sc);
DelPic(pic_);
}
}
int lastMes(){
SetFont(144/sc,"MS ゴシック",128,0,0,0,700);
BackMode(1);
TextColor(0,0,0);
TextWrite("おしまい",basePic,20/sc+2,500/sc+2);
TextColor(255,0,0);
TextWrite("おしまい",basePic,20/sc,500/sc);
}
int playBGM(){
if(bgms==1){
mes(MIDI_END){
PlayMIDI(bgm);
}
PlayMIDI(bgm);
}
}
int exit(){
int ans;
ans=MsgBox("終了しますか?",0x24);
if(ans==7)return;
CloseWinAll();
ExitTitle();
del_all;
del_me;
}
int playSE(){
}
int zoomin(){
if(zoom==1){
int scz;
int i,j;
scz=2;
zoomPic=CreatePic(basePic,picW+10,(picH0+picH*2)/scz);
SetPaintColor( 0xffffff );
SetLineSize(1);
DrawRect(zoomPic,0,0,picW+10,(picH0+picH*2)/scz);
MoveSPic(pic[0],0,0,picW,picH0,zoomPic,picW/4+5,0,picW/scz,picH0/scz);
for(i=0;i<4;i=i+1){
j=1-i/2;
MoveSPic(pic[i+1],0,0,picW,picH,zoomPic,j*(picW/2+10),((i%2)*picH+picH0)/scz,picW/scz,picH/scz);
}
zoomWin=OpenWin(zoomPic);
CloseWin(mainWin);
}
else if(zoom==0){
mainWin=OpenWin(basePic);
CloseWin(zoomWin);
DelPic(zoomPic);
}
}
int loadIni(){
int i;
title=GetIniInt("4koma","title",1,"4koma.ini");
name=GetIniStr("4koma","name","4コマまんが","4koma.ini");
koma=GetIniInt("4koma","koma",4,"4koma.ini");
for(i=title;i<=koma;i=i+1){
file[i]=GetIniStr("4koma",StrPrint("koma%ld",i),"","4koma.ini");
}
bgm=GetIniStr("4koma","bgm","NO_BGM","4koma.ini");
if(IsExist(bgm)==0)bgms=0;
else bgms=1;
}
int makeTitle(){
pic[0]=CreatePic(pic[1],picW/sc,200/sc);
SetPaintColor(0xffffff);
SetLineSize(1);
DrawRect(pic[0],0,0,picW/sc,200/sc);
SetFont(100/sc,"MS ゴシック",128,0,0,0,500);
BackMode(1);
BgColor(255,255,255);
TextColor(0,0,255);
TextWrite("4コママンガ",pic[0],10/sc,50/sc);
}
int showHelp(){
MsgBox("それゆけ!フィリーちゃん・びゅーわー"+LF+
"------------------------------"+LF+
"・左クリックで次のコマへ進みます。 "+LF+
"・右クリックで前のコマに戻ります。 "+LF+
"・最後までいくと、終了するかどうか "+LF+
" を聴いてきます。「はい」で終了。 "+LF+
"・何かキーを押すと、全部のコマを "+LF+
" 一緒に表示します。もう一度押すと "+LF+
" 元に戻ります。 "+LF+
"・[H]キーでこのヘルプを表示します。 "+LF+
"------------------------------"+LF+
"では、お楽しみください(^_^) ");
}