home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DOS/V Power Report 1999 February
/
VPR9902A.BIN
/
FFILLY
/
UG
/
mwin.tfy
< prev
next >
Wrap
Text File
|
1998-04-30
|
3KB
|
74 lines
// WIN ----------------------------------------------------------------
int MainWin( int winnum, int mwn, int pic ){
int mwin;
int x, y, w, h;
int n, i;
str string;
w = ASW + ASX * 2; h = ASH + ASY + 50;
x = scrW/2 - w/2; y = scrH/2 - h/2 - 50;
gageW = ( ASW -100 ) / 2; gageH = 10;
GB_Cap[0] = ""; // NON 3D
inputButArr( "FILE", -1, h - 40, 80, 20, -2, 3, 1, 6 );
GB_Cap[1] = "CARD"; GB_X[1] = ASX;
GB_Cap[2] = "START"; GB_X[2] = ASX + 90;
GB_Cap[3] = "RETURN"; GB_X[3] = ASX + 180;
GB_Cap[4] = "EXIT"; GB_X[4] = ASX + ASW - 80;
// ウインドウ作成関数
TextColor( 0, 0, 0 ); BackMode(1);
makeWindow( winnum, pic, 0,0, w,h, 4, 0, 0xc0c0c0 );
paintButton( pic, ASX-1,ASY-1, ASW+2,ASH+2, -2, 0x808080, 0xffffff );
//clearScr( pic, PrgTytle, 0x000000 );
MovePic( blackImage, 0, 0, ASW, ASH, pic, ASX, ASY );
paintLabel( pic, w/2-40,10, 80,20, 0x808000, " ENERGY" );
paintButton( pic, ASX-1,9, gageW+2,gageH+2, 0x000000, 0x808080, 0xffffff );
paintButton( pic, ASX+ASW-gageW-1,9, gageW+2,gageH+2, 0x000000, 0x808080, 0xffffff );
string = " Z=Punch X=Kick C=Tuckle";
paintLabel( pic, ASX + 270, h - 40, ASW - 360, 20, 0x000000, string );
CapTitle( StrPrint( " %s", prgTitle ) );
mwin = OpenWin( pic, x,y, w,h, 0,0, 0x000000 ); // ウィンドウ
mes( USER ){
if( GetHiWord( MesP1 ) == winnum ) { // GET WIN NUM
n = GetLowWord( MesP1 ); // GET MES NUM
if ( n == 1 && gStatus == GS_MAIN ) { // CARD
CardWin( winnum +1, winnum, pic );
}
else if ( n == 2 && gStatus == GS_MAIN ) { // START
clearScr( pic, "NOW LOADING", 0x808000 );
startGame( pic );
}
else if ( n == 3 &&
( gStatus == GS_PLAY || gStatus == GS_POSE ) ) { // END
endGame( pic );
}
else if ( n == 4 && gStatus == GS_MAIN ) { // EXIT
//del_us;
if ( M_Open == 1 ) { MCI( "close BGM" ); }
PostMes( USER, MakeLong( 1000, winnum ) );
CloseWin( mwin );
releaseRes();
TheEnd();
del_me;
}
} // if winnum end
} // mesUSER end
} // MainWin end
// CLEAR --------------------------------------------------------------
int clearScr( int pic, str ser, int col ){
paintButton( pic, ASX,ASY, ASW,ASH, col, -2, -2 );
paintText( pic, ASX + ASW/2 - StrLen( ser ) * 20 / 2, ASY + ASH/2 -100,
40, 255,255,255, ser );
} // clearLWScr end