stoneage8.5/石器时代8.5客户端最新源代码/石器源码/system/ime.cpp

187 lines
4.9 KiB
C++
Raw Normal View History

2020-06-23 15:27:59 +08:00
/************************/
/* ime.cpp */
/************************/
#include "../systeminc/version.h"
#include "../systeminc/system.h"
#include "winnls32.h"
#include "../systeminc/font.h"
#include "../other/caryIme.h"
#include "../systeminc/menu.h"
#include "../systeminc/battleMenu.h"
#ifdef _TALK_WINDOW
#include "../systeminc/talkwindow.h"
#endif
#include "../systeminc/DirectDraw.h"
DWORD dwInfo;
void ShowBottomLineString(int iColor,LPSTR lpstr)
{
LPSTR lpstr1=GetImeString();
dwInfo = 0;
if(!lpstr1 && lpstr[0]!=0){
dwInfo = 1;
StockFontBuffer( 8, 460 + DISPLACEMENT_Y, FONT_PRIO_FRONT, iColor, lpstr, 0 );
}
}
// Terry add 2003/12/16 for <20><><EFBFBD><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>ʱ,<2C><>ʾ<EFBFBD><CABE>Ʒ˵<C6B7><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>
extern BOOL bShowItemExplain;
#ifdef _MO_SHOW_FPS
extern int framesToShow;
extern int skipFramesToShow;
#endif
// end
// <09><><EFBFBD><EFBFBD>Ĵ<EFBFBD><C4B4><EFBFBD>
void ImeProc()
{
// <20><>ʾ<EFBFBD><CABE><EFBFBD><EFBFBD><EBB7A8><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
// Terry fix 2003/12/16 for <20><><EFBFBD><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>ʱ,<2C><>ʾ<EFBFBD><CABE>Ʒ˵<C6B7><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>
//if( TaskBarFlag == FALSE ){ <20><><EFBFBD>иij<D0B8><C4B3><EFBFBD>һ<EFBFBD><D2BB>
if(TaskBarFlag == FALSE && bShowItemExplain == FALSE){
// end
LPSTR lpstr=GetImeString();
LPSTR lpstr1;
if(lpstr){
#ifdef _TELLCHANNEL
StockFontBuffer(8,420 + DISPLACEMENT_Y ,FONT_PRIO_FRONT,FONT_PAL_WHITE,lpstr,0);
#else
StockFontBuffer(8,460 + DISPLACEMENT_Y ,FONT_PRIO_FRONT,FONT_PAL_WHITE,lpstr,0);
#endif
#ifdef _TALK_WINDOW
if(g_bTalkWindow) TalkWindow.Update();
#endif
}
lpstr1=GetImeDescString();
if( 1!=dwInfo){
if( lpstr1){
char* BIG5ToGB2312(const char* szBIG5String);
extern int <EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
extern int <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>;
if(<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>){
char <EFBFBD><EFBFBD><EFBFBD><EFBFBD>[1024]={0};
LCMapString(0x804,0x4000000,lpstr1, strlen(lpstr1),<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,1024);
if(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>==950)
StockFontBuffer(530-strlen(lpstr1)*(FONT_SIZE>>1) + DISPLACEMENT_X,460 + DISPLACEMENT_Y ,FONT_PRIO_FRONT,0,BIG5ToGB2312((const char *)<EFBFBD><EFBFBD><EFBFBD><EFBFBD>),0);
else
StockFontBuffer(530-strlen(lpstr1)*(FONT_SIZE>>1) + DISPLACEMENT_X,460 + DISPLACEMENT_Y ,FONT_PRIO_FRONT,0,<EFBFBD><EFBFBD><EFBFBD><EFBFBD>,0);
}else{
if(<EFBFBD><EFBFBD><EFBFBD><EFBFBD>==950)
StockFontBuffer(530-strlen(lpstr1)*(FONT_SIZE>>1) + DISPLACEMENT_X,460 + DISPLACEMENT_Y ,FONT_PRIO_FRONT,0,BIG5ToGB2312((const char *)lpstr1),0);
else
StockFontBuffer(530-strlen(lpstr1)*(FONT_SIZE>>1) + DISPLACEMENT_X,460 + DISPLACEMENT_Y ,FONT_PRIO_FRONT,0,lpstr1,0);
}
}
char tmp[64];
extern DWORD dwPingTime, dwPingState;
if( dwPingState & 0x80000000){
wsprintf( tmp, "*%d", dwPingTime);
dwPingState++;
if( (dwPingState&0xff) > 40)
dwPingState = 0;
}else
wsprintf( tmp, " %d", dwPingTime);
StockFontBuffer( 605 + DISPLACEMENT_X, 460 + DISPLACEMENT_Y , FONT_PRIO_FRONT, FONT_PAL_WHITE, tmp, 0 );
#ifndef _REMAKE_20
lpstr = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ";
switch( AI){
case AI_ATTACK:
lpstr = "ǿ<EFBFBD>ƹ<EFBFBD><EFBFBD><EFBFBD>";
break;
case AI_GUARD:
lpstr = "ǿ<EFBFBD>Ʒ<EFBFBD><EFBFBD><EFBFBD>";
break;
case AI_SELECT:
lpstr = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ";
break;
}
StockFontBuffer( 540 + DISPLACEMENT_X, 460 + DISPLACEMENT_Y , FONT_PRIO_FRONT, FONT_PAL_WHITE, lpstr, 0 );
#endif
#ifdef _CHANNEL_MODIFY
int FontColor = 0 ;
switch(TalkMode){
case 0:
lpstr1 = "һ<EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>";
break;
case 1:
FontColor = FONT_PAL_GREEN;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>";
break;
case 2:
FontColor = FONT_PAL_AQUA;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>";
break;
case 3:
FontColor = FONT_PAL_PURPLE;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>";
break;
#ifdef _CHAR_PROFESSION
case 4:
FontColor = FONT_PAL_BLUE2;
lpstr1 = "ְҵƵ<EFBFBD><EFBFBD>";
break;
#else
case 4:
FontColor = FONT_PAL_PURPLE;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>";
break;
#endif
#ifdef _CHANNEL_WORLD
case 5:
FontColor = FONT_PAL_YELLOW;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>";
break;
#endif
#ifdef _CHANNEL_ALL_SERV
case 6:
FontColor = FONT_PAL_GREEN2;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƶ<EFBFBD><EFBFBD>";
break;
#endif
}
StockFontBuffer( 10, 460 + DISPLACEMENT_Y, FONT_PRIO_FRONT, FontColor, lpstr1, 0 );
#else
#ifdef _TELLCHANNEL
int FontColor = 0 ;
switch(TalkMode){
case 0:
lpstr1 = "һ<EFBFBD><EFBFBD>ģʽ";
break;
case 1:
FontColor = FONT_PAL_GREEN;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ";
break;
#ifdef _FRIENDCHANNEL
case 2:
FontColor = FONT_PAL_PURPLE;
lpstr1 = "Ƶ<EFBFBD><EFBFBD>ģʽ";
break;
#endif
#ifdef _CHANNEL_WORLD
case 6:
FontColor = FONT_PAL_BLUE;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ";
break;
#endif
#ifdef _CHANNEL_ALL_SERV
case 7:
FontColor = FONT_PAL_BLUE;
lpstr1 = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ģʽ";
break;
#endif
}
StockFontBuffer( 10, 460 + DISPLACEMENT_Y, FONT_PRIO_FRONT, FontColor, lpstr1, 0 );
#endif
#endif
#ifdef _MO_SHOW_FPS
wsprintf(tmp, "<EFBFBD><EFBFBD>ǰFPS:%3d֡/<2F><> , <20><>֡<EFBFBD><D6A1>: %d֡/<2F><>", framesToShow, skipFramesToShow);
StockFontBuffer( 270, 460 + DISPLACEMENT_Y, FONT_PRIO_FRONT, FONT_PAL_YELLOW, tmp, 0 );
#endif
}
}
// Terry add 2003/12/16 for <20><><EFBFBD><EFBFBD><EFBFBD>Ӵ<EFBFBD><D3B4><EFBFBD><EFBFBD><EFBFBD>ʱ,<2C><>ʾ<EFBFBD><CABE>Ʒ˵<C6B7><CBB5><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʾ<EFBFBD><CABE><EFBFBD>
bShowItemExplain = FALSE;
// end
}