stoneage8.5/石器时代8.5客户端最新源代码/石器源码/systeminc/chat.h

157 lines
4.1 KiB
C
Raw Normal View History

2020-06-23 15:27:59 +08:00
/************************/
/* chat.h */
/************************/
#ifndef _CHAT_H_
#define _CHAT_H_
//cary 256 -> 260
#define STR_BUFFER_SIZE 260 // ???????????
#ifdef _NEW_RESOMODE
#ifdef _SA_LIAOTIAN_
#define MAX_CHAT_LINE 200 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#else
#define MAX_CHAT_LINE 20 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#endif
#else
#define MAX_CHAT_LINE 20 // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
#endif
#define DEF_CHAT_LINE 20 // ??<3F>@<40>e???????
#define MAX_CHAT_HISTORY 64 // ???????????
#define DEF_VOICE 3 // ?????<3F><>?<3F><>??
#define MAX_VOICE 10 // ?????<3F><>??<3F><><EFBFBD>k
#define NORMAL_TYPE 0
#define BLIND_TYPE 1
#define NUMBER_TYPE 2
#ifdef _SAHOOK //Syu ADD Hook<6F><6B>ʽ
#define HOOK_TYPE 3
#endif
// <20><>????????<3F>B<EFBFBD>l
typedef struct{
char buffer[ STR_BUFFER_SIZE ]; // ??<3F><>?<3F><>???????
unsigned char len; // <20><>??<3F><>?
unsigned char lineLen; // ???<3F><>??<3F><>?
unsigned char lineDist; // ?????????????
unsigned char cnt; // ???<3F><>???
unsigned char color; // <20><>??<3F><>
unsigned char cursor; //<2F>α<EFBFBD><CEB1><EFBFBD>λ<EFBFBD><CEBB>
int x, y; // <20><>????<3F><>
int imeX, imeY; // ???<3F><>???<3F><><EFBFBD><EFBFBD>?<3F><>?<3F><>
int fontPrio; // <20><><EFBFBD><EFBFBD>??<3F>I<EFBFBD>T
BOOL filterFlag; // <20><>???????????????
int hitFontNo; // <20><><EFBFBD><EFBFBD>?<3F><>??<3F>k?????????<3F>R<EFBFBD>e??
}STR_BUFFER;
typedef struct _CHAT_BUFFER{
char buffer[ STR_BUFFER_SIZE + 1 ]; // ??<3F><>?<3F><>???????
unsigned char color;
#ifdef _MO_CHAT_EXPRESSION
int BmpNo;
int x;
_CHAT_BUFFER * NextChatBuffer;
#endif
#ifdef _FONT_SIZE
int fontsize;
#endif
}CHAT_BUFFER;
// ???????????<3F>B<EFBFBD>l
typedef struct{
char str[ MAX_CHAT_HISTORY ][ STR_BUFFER_SIZE + 1 ]; // ??????????<3F><>??
int newNo; // ?<3F><>??????????<3F>k?
int nowNo; // ????????????<3F>k?
}CHAT_HISTORY;
// onlinegm<67><6D><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>¼
typedef struct{
char str[115][STR_BUFFER_SIZE + 1 ];
int newNo;
int nowNo;
int addNo;
int lockNo;
BOOL color[115];
}INPUT_HISTORY;
// ???????????????????????
extern STR_BUFFER *pNowStrBuffer;
// ?????????
extern CHAT_BUFFER ChatBuffer[];
// <20><><EFBFBD><EFBFBD>?<3F>V????????
extern STR_BUFFER MyChatBuffer;
// ??????????
extern int NowChatLine;
// ??????????
extern int NowMaxChatLine;
// ??<3F><>?<3F><>??
extern int NowMaxVoice;
/* <09><><EFBFBD><EFBFBD>һ<EFBFBD><D2BB>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>String buffer
parameter: c: <EFBFBD><EFBFBD>Ԫ */
void StockStrBufferChar(char c);
/* <09><>˫λԪ<CEBB><D4AA>Ԫ<EFBFBD><D4AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀǰ<C4BF><C7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>String buffer
parameter: lpc: ˫λԪ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ԫ */
void StockStrBufferDBChar(char *lpc);
/* ?????????????????????? */
void ChatBufferToFontBuffer( void );
void ChatProc( void );
void StockChatBufferLine( char *str, unsigned char color );
#ifdef _FONT_SIZE
void StockChatBufferLineExt( char *str, unsigned char color, int fontsize );
#endif
void ClearChatBuffer( void );
int GetStrLastByte( char *str );
int GetStrWidth( char *str );
void GetKeyInputFocus( STR_BUFFER *pStrBuffer );
/* ????????? **********************************************************/
void InitChat( void );
/* ???????? ************************************************************/
void ChatProc( void );
// ?????????<3F><><EFBFBD><EFBFBD>?? **************************************************/
void FlashKeyboardCursor( void );
void KeyboardLeft();
void KeyboardRight();
/* ???????? ************************************************************/
void KeyboardReturn( void );
// ?????? ***************************************************************/
void KeyboardBackSpace( void );
// ???????<3F><>??<3F><><EFBFBD>V ****************************************************************/
BOOL SaveChatHistoryStr( int no );
// ???????<3F><>??<3F><>??? ****************************************************************/
BOOL LoadChatHistoryStr( void );
BOOL LoadReadSayShield( void );
BOOL LoadReadNameShield( void );
bool CheckSay( const char* strSay, const char szReplace = '*' );
bool CheckName( const char* strSay/*, char* word*/ );
// ?????????<3F>V????????? ********************************************/
void GetClipboad( void );
// ??????????????????<3F><>????? ***********************************/
void SetClipboad( void );
int GetCharByte( char c );
#ifdef _FRIENDCHANNEL //ROG ADD <20><><EFBFBD><EFBFBD>Ƶ<EFBFBD><C6B5>
void StrToNowStrBuffer( char *str );
#endif
#ifdef __ONLINEGM
int StrToNowStrBuffer2( char *str );
#endif
#endif