?? menustart.cpp
字號:
SMenu[MN_OKCANCEL_MESSAGEBOX].y = y;
strcpy(SMenu[MN_OKCANCEL_MESSAGEBOX].nField[4].temp, source);
SMenu[MN_OKCANCEL_MESSAGEBOX].key = param;
}
else
{
if( g_StartMenuOn )
SMenu[MN_OK_MESSAGEBOX].nTemp = menu;
else SMenu[MN_OK_MESSAGEBOX].nTemp = y_MenuFocus;
y_MenuFocus = MN_OK_MESSAGEBOX;
SMenu[MN_OK_MESSAGEBOX].bActive = true;
SMenu[MN_OK_MESSAGEBOX].x = x;
SMenu[MN_OK_MESSAGEBOX].y = y;
strcpy(SMenu[MN_OK_MESSAGEBOX].nField[3].temp, source);
SMenu[MN_OK_MESSAGEBOX].key = param;
}
MP3( SN_WARNING );
}
//############################## MessageBox CALL ################################//
void CallMessageBox(BOOL bBig, int x, int y, char *source, BOOL bType ) // 奴 皋矯瘤 冠膠?, x,y 諒釬, 皋矯瘤, 鷗撈俏 瓤苞 楷免?
{
x +=GABX_SCREEN;
y +=GABY_SCREEN;
if(bBig) // BigMessageBox Call
{
SMenu[MN_MESSAGEBOX_BIG].bActive = TRUE;
SMenu[MN_MESSAGEBOX_BIG].x = x;
SMenu[MN_MESSAGEBOX_BIG].y = y;
SMenu[MN_MESSAGEBOX_BIG].nField[0].x = 30;
SMenu[MN_MESSAGEBOX_BIG].nField[0].y = 35;
strcpy(SMenu[MN_MESSAGEBOX_BIG].nField[0].temp, source);
}
else
{
SMenu[MN_MESSAGEBOX_SMALL].bActive = TRUE;
SMenu[MN_MESSAGEBOX_SMALL].x = x;
SMenu[MN_MESSAGEBOX_SMALL].y = y;
SMenu[MN_MESSAGEBOX_SMALL].nField[0].x = 27;
SMenu[MN_MESSAGEBOX_SMALL].nField[0].y = 27;
strcpy(SMenu[MN_MESSAGEBOX_SMALL].nField[0].temp, source);
}
}
//################################################################################//
void SetCharacterData()
{
int i,j;
for(i=0;i<MAX_SHN;i++)
{
for(j=0;j<MAX_SHN_FIELD;j++)
{
SHideNomal[i][j].bShow=FALSE;
}
}
for(i=0;i<MAX_CHARACTERDATA;i++)
{
if(SCharSource.nCharacterData[i]!=-1) SHideNomal[i][SCharSource.nCharacterData[i]].bShow=TRUE;
}
}
void StartMenuSetting()
{
int i;
SCharSource = SCharSource1;
InitStartMenu();
g_StartMenuOn = true;
character_active = 0;
for(i=0;i<MAX_START;i++) //老竄 葛電 皋春 備煉眉甸闌 厚勸己欄肺 汲瀝
{
SMenu[menu[i]].bActive=FALSE;
SMenu[menu[i]].Id = menu[i];
}
StartMenuSet();
CommonMenuSet(); //農扁啊 累籃 皋春甸闌 檬扁拳
if( SysInfo.notconectserver ) LoadCh[0] = SCharacterData;
LoadHangulEnglishFont( "./data/han.fnt", "./data/eng.fnt" );
HangulOutputArea( 0, SCREEN_WIDTH-1, 0, SCREEN_HEIGHT-1);
SCharSource.nCharacterData[FACE] = -1; // 貿瀾 汲瀝俊 -1;
QuitFlag = 0;
#ifdef LIGHT_VERSION_
g_pLightVersion->LoadLightVersionWeapon();
#endif
}
inline BOOL MouseInRectCheak(int x, int y, RECT Box, BOOL flag)
{
POINT pointMouse;
if(flag) pointMouse = g_pointMouse;
else pointMouse = StateMousePoint;
if(pointMouse.x > Box.left+x
&& pointMouse.x < Box.right+x
&& pointMouse.y >Box.top+y
&& pointMouse.y <Box.bottom+y)
{
return TRUE;
}
return FALSE;
}
//######################################################################################################//
// 皋矯瘤殿闌 免仿竅綽 竊薦.
// thai2 YGI
void MessagePut()
{ //< CSD-030324
Hcolor( FONT_COLOR_NUMBER );
static x=99, y=357+GABY_SCREEN;
if(SMenu[MN_MESSAGEBOX_BIG].bActive)
{
#ifdef THAI_LOCALIZING_
RectTextPut( SMenu[MN_MESSAGEBOX_BIG].x+SMenu[MN_MESSAGEBOX_BIG].nField[0].x+20, SMenu[MN_MESSAGEBOX_BIG].y+SMenu[MN_MESSAGEBOX_BIG].nField[0].y+20, 200, SMenu[MN_MESSAGEBOX_BIG].nField[0].temp );
#else
kein_TextPut(SMenu[MN_MESSAGEBOX_BIG].x+SMenu[MN_MESSAGEBOX_BIG].nField[0].x, SMenu[MN_MESSAGEBOX_BIG].y+SMenu[MN_MESSAGEBOX_BIG].nField[0].y, SMenu[MN_MESSAGEBOX_BIG].nField[0].temp);
#endif
if(LButtonDown || y_delay > 30 )
if(!SMenu[MN_YESNO].bActive)
CallMenu(MN_YESNO,x,y,TRUE); // 皋春 鍋齲綽 MN_YESNO撈絆 付快膠綽 刀痢撈促 */
y_delay++;
}
else if(SMenu[MN_MESSAGEBOX_SMALL].bActive)
{
kein_TextPut(SMenu[MN_MESSAGEBOX_SMALL].x+SMenu[MN_MESSAGEBOX_SMALL].nField[0].x, SMenu[MN_MESSAGEBOX_SMALL].y+SMenu[MN_MESSAGEBOX_SMALL].nField[0].y, SMenu[MN_MESSAGEBOX_SMALL].nField[0].temp);
if(LButtonDown || y_delay > 30) CallMenu(MN_YESNO,x,y,TRUE);
if(!SMenu[MN_YESNO].bActive)
CallMenu(MN_YESNO,x,y,TRUE); // 皋春 鍋齲綽 MN_YESNO撈絆 付快膠綽 刀痢撈促
y_delay++;
}
} //> CSD-030324
//################################ display image little-by-little ####################################//
// 輯輯灑 唱鷗唱綽 撈固瘤. 肯傈灑 促 唱坷霸 竅妨擱 bEnd俊 TRUE甫 持綽促.
int k_PutImage(int x, int y, int nImageNumber, BOOL bEnd)
{
static int rx=1;
if( !spr[nImageNumber].img )
{
LoadSmallMenuImage( nImageNumber );
}
if(SMenu[MN_MAINSTART_BACK].nTemp) rx=1;
SMenu[MN_MAINSTART_BACK].nTemp = FALSE;
if(bEnd) rx=39;
if(2*rx>x && 2*rx+1 < spr[nImageNumber].xl)
{
PutCmprsImgCliping(x, y, spr[nImageNumber].img, g_DestBackBuf, 0, 16*rx+1, 0, (int)(12*(float)rx)+1);
}
rx=(rx+1)%321;
return rx;
}
//#########################################################################################################//
//皋春啊 勸己拳 登樂蠢襯甫 魄竄秦輯 免仿秦 林綽 竊薦
extern void PutStartLodingImg( );
#ifdef _DEBUG
extern int g_MyCode;//021001 lsw
#endif
void StartMenuDisplay()//020828 lsw
{
int i,x;
for(x=0;x<MAX_START;x++)
{
i=menu[x];
if(SMenu[i].bActive) //i鍋擄 皋春啊 勸己拳 登樂襯?
{
//< kjy-04325
if ( i == 44 ) // 輯滾 急琶 拳擱俊輯 硅版闌 refresh茄促..
PutStartLodingImg(); // 付快膠 器牢磐 儡惑 瓤苞 規瘤.. 040325 kjy
//> kjy-04325
UpperMenuNomalPut(SMenu[i].x, SMenu[i].y, SMenu[i].nImageNumber, SMenu[i].nImageType );
StartMenuSubProcessType( &SMenu[i] );
}
}
MessagePut();
#ifdef _DEBUG
if( GetSysInfo( SI_GAME_MAKE_MODE ) )
{
Hcolor( FONT_COLOR_WHITE );
SetHangulAlign( TA_LEFT );
const int iX = 5, iY = 5;
const int iWidth = TXT_BG_SHORT_WIDTH;//021001 lsw
int iCount = 0;
int iReultLineCount = 0;
int iBlankGab = 0;
int iReultBlankSize = 0;
const int iLineGab = TxtOut.GetLineGab();
const int iBlankGabSize = TxtOut.GetBlankGabSize();
TxtOut.Init(COLOR_BLACK,TXT_BG_SHORT_WIDTH,12);
TxtOut.PutTextHeaderBGImg(iX,iY+iBlankGab+iLineGab*iCount,iWidth);
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"FPS:[%d]",g_FrameMgr.GetFrameCount() );
iCount += iReultLineCount;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"MyCode:[%d]",g_MyCode );
iCount += iReultLineCount;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,BetaTest? "Beta Tester" : "Normal User" );
iCount += iReultLineCount;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"Start MapNo:[%d]", StartPosition );
iCount += iReultLineCount;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"Menu Focus:[%d]", y_MenuFocus );
iCount += iReultLineCount;
iReultBlankSize = TxtOut.RcBlankOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1);
iBlankGab+=iReultBlankSize;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"Proxy IP:");
iCount += iReultLineCount;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"[%s]", g_GameInfo.proxy_ip[0] );
iCount += iReultLineCount;
iReultBlankSize = TxtOut.RcBlankOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1);
iBlankGab+=iReultBlankSize;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"ServerSet Name:");
iCount += iReultLineCount;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"[%s]", select_server_name);
iCount += iReultLineCount;
iReultBlankSize = TxtOut.RcBlankOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1);
iBlankGab+=iReultBlankSize;
iReultLineCount = TxtOut.RcTXTOut(iX,iY+iBlankGab+iLineGab*iCount,iWidth,1,"Character LV:[%d]", SCharacterData.nLevel);
iCount += iReultLineCount;
TxtOut.PutTextTailBGImg(iX,iY+iBlankGab+iLineGab*iCount,iWidth);
}
if( SysInfo.notconectserver )
{
if( g_SetGuildMarkViewOn )
{
EraseScreen( curr_direct_draw_info, RGB( 0x00, 0x00, 0x00 ) );
if( ( g_SetGuildMarkViewOn-1 )*40 > g_GuildMax ) g_SetGuildMarkViewOn= 1;
for( int i=(g_SetGuildMarkViewOn-1)*40; i<=g_GuildMax && i<(g_SetGuildMarkViewOn)*40; i++ )
{
int x = 200+(i%40)/7*80;
int y = 80+(i%40)%7*50;
PutGuildImage( x, y, i );
}
if(g_aCurrentKeys[DIK_PGDN] & 0x80)
{
g_SetGuildMarkViewOn ++;
}
if(g_aCurrentKeys[DIK_PGUP] & 0x80)
{
g_SetGuildMarkViewOn --;
if( g_SetGuildMarkViewOn <= 0 ) g_SetGuildMarkViewOn =1;
}
}
}
if( GetSysInfo( SI_GAME_MAKE_MODE ) )
{
if( guild_mark_main.m_Spr.img )
PutCompressedImage( 100, 100, &guild_mark_main.m_Spr );
}
#endif _DEBUG
return;
}
//扁夯 海撈膠 皋春甫 免仿
inline void UpperMenuNomalPut(int &x, int y,int nImageNumber, int type)
{
if( !nImageNumber && !type ) return;
Spr *s;
s = GetSprOfMenu( type, nImageNumber );
if( s )
{
if( x == CENTER_X )
x = (SCREEN_WIDTH-s->xl)/2;
if( x== RIGHT_X)
x = SCREEN_WIDTH-s->xl;
//<< 031022 kyo
if( type == NEW_EMOTE_IMG )
{
PutCompressedImageFX( x+s->ox, y+s->oy, s, 20, 1);
}
else
{
PutCompressedImage( x+s->ox, y+s->oy, s );
}
//>> 031022 kyo
}
}
//###########################################################################################//
//###########################################################################################//
//###########################################################################################//
//###########################################################################################//
//付快膠惑炔俊 蝶弗 皋春狼 貿府
void StartMenuChecking()
{
int i,j,k,x;
static bool b_DoubleClickOn = false;
for(x=0;x<MAX_START;x++)
{
i=menu[x];
if(SMenu[i].bActive) //i鍋擄 皋春啊 勸己拳 登樂襯?
{
if( y_MenuFocus && y_MenuFocus != i ) continue;
for(j=0; j<SMenu[i].nFieldCount;j++) // rect 屈
{
// if( i == MN_SELECT_CHARACTER )
// {
// if( j >=0 && j < 4 ) SMenu[i].CheakType =3;
// else SMenu[i].CheakType = 0;
// }
switch(SMenu[i].CheakType)
{
default : {
if(MouseInRectCheak(SMenu[i].x, SMenu[i].y, SMenu[i].nField[j].rCheakBox)) SMenu[i].nField[j].fRectMouse=TRUE;
else SMenu[i].nField[j].fRectMouse=false;
if(SMenu[i].nField[j].nType==FT_HIDE_NOMAL_ONE_PUT)
{
for(k=SMenu[i].nField[j].nSHideNomalStart; k<(SMenu[i].nField[j].nSHideNomalStart)+(SMenu[i].nField[j].nShideNomalPlus) && k<SMenu[i].nField[j].nSHideNomalCount; k++)
{
if( MouseInRectCheak(SMenu[i].x, SMenu[i].y, SHideNomal[SMenu[i].nField[j].nSHideNomalNumber][k].rCheakBox))
SHideNomal[SMenu[i].nField[j].nSHideNomalNumber][k].bRect=true;
else SHideNomal[SMenu[i].nField[j].nSHideNomalNumber][k].bRect=false;
}
}
}
break;
case 1 : // 硅凱屈
case 2 :{
int ArrayX=(g_pointMouseX - (SMenu[i].x + 31) )/10;
int ArrayY=(g_pointMouseY - (SMenu[i].y + 31) )/10;
if( (ArrayX >= 0) && (ArrayX <= 15) && (ArrayY >=0) && (ArrayY <=15) ) // 付快膠甫 撈儈秦 備茄 諒釬啊 硅凱俊 甸絹啊襯?
{
if( ( (CheakArray[SMenu[i].CheakType - 1][ArrayY][ArrayX] - 1) == j ) )
SMenu[i].nField[j].fRectMouse = true;
else
{
SMenu[i].nField[j].fRectMouse=false;
SMenu[i].nField[j].fLButtonDown=false;
SMenu[i].nField[j].fCheakFlag=false;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -