home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1998 October
/
VPR9810A.ISO
/
FFILLY
/
SPON705
/
FACE2.TFY
< prev
next >
Wrap
Text File
|
1998-05-19
|
4KB
|
209 lines
// Created By sPon 97.4
//
// 新しいシナリオ
//
//
#info INAM "新しいシナリオ"
int mDown; // Mouse Down Flag
int xoff, yoff; // Background Offset
int pw, ph; // Background Size
int pic[]; // Picture Array
int jump[]; // Jump Counter
// マウスの位置が矩形の範囲内かどうか調べる関数
isInRect(int x1, int y1, int x2, int y2)
{
x1 = x1 + xoff; y1 = y1 + yoff;
x2 = x2 + xoff; y2 = y2 + yoff;
if(x1 <= MesP2 && MesP2 < x2 && y1 <= MesP3 && MesP3 < y2){
return (1);
}
return (0);
}
LoadResource()
{
LoadPic("p00.bmp"); // Default Background
pic[0] = LoadPic("p00.bmp");
pic[1] = LoadPic("p01.bmp");
pic[2] = LoadPic("p02.bmp");
pic[3] = LoadPic("p04.bmp");
pic[4] = LoadPic("p05.bmp");
pic[5] = LoadPic("p06.bmp");
pic[6] = LoadPic("p07.bmp");
pic[7] = LoadPic("p12.bmp");
pic[8] = LoadPic("p11.bmp");
pic[9] = LoadPic("p08.bmp");
pic[10] = LoadPic("p09.bmp");
pic[11] = LoadPic("p13.bmp");
pic[12] = LoadPic("p14.bmp");
}
// オープニング
main()
{
int sw, sh;
LoadResource();
pw = PicWidth(0); ph = PicHeight(0);
sw = WinInfo(0); sh = WinInfo(1);
xoff = (sw - pw) / 2; yoff = (sh - ph) / 2;
OpenWin(0, 0, 0, sw, sh, -xoff, -yoff, 0x000000);
mDown = 0;
scene0();
}
// タイトル
scene0()
{
MovePic(pic[0], 0, 0, PicWidth(pic[0]), PicHeight(pic[0]), 0);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,MovePic(pic[1], 0, 0, pw, ph, 0, 0, 0, 1, 20);
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,MovePic(pic[0], 0, 0, pw, ph, 0, 0, 0, 1, 40);
,,,,,,,,,,,,,,,,,,,,PlayMIDI("FACE.MID");
,,,,,,,,,,,,,,,,,,,,MovePic(pic[2], 0, 0, pw, ph, 0, 0, 0);
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,MovePic(pic[3], 0, 0, pw, ph, 0, 0, 0);
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; scene1(); del_me;
end_step;
}}
}
// 顔
scene1()
{
MovePic(pic[4], 0, 0, PicWidth(pic[4]), PicHeight(pic[4]), 0);
mes(TIME) { step(2) {
,,MovePic(pic[5], 0, 0, pw, ph, 0, 0, 0);
,,del_us; scene1(); del_me;
end_step;
}}
mDown = 0;
mes(LBDOWN){
mDown = 1;
}
mes(LBUP) { if(mDown == 1){
if(isInRect(110, 86, 151, 107)){
del_us; scene2(); del_me;
} else if(isInRect(165, 84, 201, 108)){
del_us; scene2(); del_me;
} else if(isInRect(145, 95, 173, 130)){
del_us; scene3(); del_me;
} else if(isInRect(128, 129, 193, 154)){
del_us; scene4(); del_me;
} else if(isInRect(72, 90, 106, 139)){
del_us; scene5(); del_me;
} else if(isInRect(210, 82, 243, 133)){
del_us; scene6(); del_me;
} else if(isInRect(86, 31, 224, 75)){
del_us; scene7(); del_me;
} else {
;
}
}}
}
// 目
scene2()
{
MovePic(pic[6], 0, 0, PicWidth(pic[6]), PicHeight(pic[6]), 0, 0, 0, 2, 20);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; scene1(); del_me;
end_step;
}}
}
// 鼻
scene3()
{
MovePic(pic[7], 0, 0, PicWidth(pic[7]), PicHeight(pic[7]), 0, 0, 0, 3, 20);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; scene1(); del_me;
end_step;
}}
}
// 口
scene4()
{
MovePic(pic[8], 0, 0, PicWidth(pic[8]), PicHeight(pic[8]), 0, 0, 0, 5, 20);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; scene1(); del_me;
end_step;
}}
}
// 右耳
scene5()
{
MovePic(pic[9], 0, 0, PicWidth(pic[9]), PicHeight(pic[9]), 0, 0, 0, 6, 20);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; scene1(); del_me;
end_step;
}}
}
// 左耳
scene6()
{
MovePic(pic[10], 0, 0, PicWidth(pic[10]), PicHeight(pic[10]), 0, 0, 0, 7, 20);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; scene1(); del_me;
end_step;
}}
}
// 頭
scene7()
{
MovePic(pic[11], 0, 0, PicWidth(pic[11]), PicHeight(pic[11]), 0);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; scene8(); del_me;
end_step;
}}
}
// Fin
scene8()
{
MovePic(pic[12], 0, 0, PicWidth(pic[12]), PicHeight(pic[12]), 0);
mes(TIME) { step(2) {
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,del_us; ending(); del_me;
end_step;
}}
}
// エンディング
ending()
{
mes(TIME){}
}