📄 game.h
字号:
// Game.h: interface for the CGame class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_GAME_H__0089D9E3_74E6_11D2_A8E6_00001C7030A6__INCLUDED_)
#define AFX_GAME_H__0089D9E3_74E6_11D2_A8E6_00001C7030A6__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <windows.h>
#include <windowsx.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <mmsystem.h>
#include <winbase.h>
#include <memory.h>
#include <string.h>
#include <process.h>
#include <direct.h>
#include "GlobalDef.h"
#include "DXC_ddraw.h"
#include "DXC_dinput.h"
#include "YWSound.h"
#include "SoundBuffer.h"
#ifdef DEF_HTMLCOMMOM
#include "stdafx.h"
#endif
#include "XSocket.h"
#include "Sprite.h"
#include "SpriteID.h"
#include "Misc.h"
#include "StrTok.h"
#include "Msg.h"
#include "Effect.h"
#include "MapData.h"
#include "ActionID.h"
#include "NetMessages.h"
#include "MouseInterface.h"
#include "CharInfo.h"
#include "Item.h"
#include "Magic.h"
#include "Skill.h"
#include "DynamicObjectID.h"
#include "GameMonitor.h"
#include "BuildItem.h"
#include "ItemName.h"
#include "Curse.h"
#include "Cint.h"
#ifdef DEF_USING_WIN_IME
#include <RICHEDIT.H>
#endif
//v2.18
#define DEF_BTNSZX 74
#define DEF_BTNSZY 20
#define DEF_LBTNPOSX 30
#define DEF_RBTNPOSX 154
#define DEF_BTNPOSY 292
#define DEF_INDEX4_MSGID 0
#define DEF_INDEX2_MSGTYPE 4
#define DEF_SOCKETBLOCKLIMIT 300
#define DEF_MAXSPRITES 20000
#define DEF_MAXTILES 500
#define DEF_MAXEFFECTSPR 100
#define DEF_MAXSOUNDEFFECTS 110 //沥柳堡 荐沥, 盔夯 100.
#define DEF_MAXCHATMSGS 500
#define DEF_MAXWHISPERMSG 5
#define DEF_MAXCHATSCROLLMSGS 80
#define DEF_MAXEFFECTS 300 //600 <- original
#define DEF_CHATTIMEOUT_A 4000
#define DEF_CHATTIMEOUT_B 500
#define DEF_CHATTIMEOUT_C 2000
#define DEF_MAXITEMS 50
#define DEF_MAXBANKITEMS 121 // v1.2 120+1
#define DEF_MAXGUILDSMAN 32
#define DEF_MAXMENUITEMS 140 //v2.15 120 ->140
#define DEF_TEXTDLGMAXLINES 300 //v2.18 3000->300
#define DEF_MAXMAGICTYPE 100
#define DEF_MAXSKILLTYPE 60
#define DEF_MAXWHETHEROBJECTS 600
#define DEF_MAXBUILDITEMS 100
#define DEF_MAXGAMEMSGS 300
#define DEF_MAXITEMNAMES 1000
// v2.171 2002-6-14
#define DEF_MAXGUILDNAMES 100
// v2.174 2002-7-19 救惑窍
#define DEF_MAXSELLLIST 12
#define WM_USER_GAMESOCKETEVENT WM_USER + 2000
#define WM_USER_LOGSOCKETEVENT WM_USER + 2001
#define DEF_GAMEMODE_NULL -2
#define DEF_GAMEMODE_ONQUIT -1
#define DEF_GAMEMODE_ONMAINMENU 0
#define DEF_GAMEMODE_ONCONNECTING 1
#define DEF_GAMEMODE_ONLOADING 2
#define DEF_GAMEMODE_ONWAITINGINITDATA 3
#define DEF_GAMEMODE_ONMAINGAME 4
#define DEF_GAMEMODE_ONCONNECTIONLOST 5
#define DEF_GAMEMODE_ONMSG 6
#define DEF_GAMEMODE_ONCREATENEWACCOUNT 7
#define DEF_GAMEMODE_ONLOGIN 8
#define DEF_GAMEMODE_ONQUERYFORCELOGIN 9
#define DEF_GAMEMODE_ONSELECTCHARACTER 10
#define DEF_GAMEMODE_ONCREATENEWCHARACTER 11
#define DEF_GAMEMODE_ONWAITINGRESPONSE 12
#define DEF_GAMEMODE_ONQUERYDELETECHARACTER 13
#define DEF_GAMEMODE_ONLOGRESMSG 14
#define DEF_GAMEMODE_ONCHANGEPASSWORD 15
#define DEF_GAMEMODE_ONVERSIONNOTMATCH 17
#define DEF_GAMEMODE_ONINTRODUCTION 18
#define DEF_GAMEMODE_ONAGREEMENT 19
#define DEF_GAMEMODE_ONSELECTSERVER 20
#define DEF_GAMEMODE_ONINPUTKEYCODE 21
#define DEF_SERVERTYPE_GAME 1
#define DEF_SERVERTYPE_LOG 2
#define DEF_CURSORSTATUS_NULL 0
#define DEF_CURSORSTATUS_PRESSED 1
#define DEF_CURSORSTATUS_SELECTED 2
#define DEF_CURSORSTATUS_DRAGGING 3
#define DEF_SELECTEDOBJTYPE_DLGBOX 1
#define DEF_SELECTEDOBJTYPE_ITEM 2
#define DEF_DOUBLECLICKTIME 300
#define DEF_MAXPARTYMEMBERS 8
#define DEF_MAXCRUSADESTRUCTURES 300
class CGame
{
public:
int m_iTeleportMapCount;
void ResponseTeleportList(char * pData);
void ResponseChargedTeleport(char * pData);
void * operator new (size_t size)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, size);
};
void operator delete(void * mem)
{
HeapFree(GetProcessHeap(), HEAP_NO_SERIALIZE, mem);
};
void ItemEquipHandler(char cItemID);
void ReleaseEquipHandler(char cEquipPos);
void ReadSettings();//蜡历技泼 历厘茄芭 佬绢坷绰 风凭.
void WriteSettings();
int iGetManaCost(int iMagicNo);
void UseMagic(int iMagicNo);
BOOL _bCheckMoveable( short sx, short sy );
BOOL FindGuildName(char* pName, int* ipIndex);
void bItemDrop_SkillDialog();
void bItemDrop_IconPannel(short msX, short msY);
void bItemDrop_Character();
void bItemDrop_Inventory(short msX, short msY);
void bItemDrop_ItemUpgrade();
void bItemDrop_SellList(short msX, short msY);
void bItemDrop_ExchangeDialog(short msX, short msY);
void bItemDrop_Bank(short msX, short msY);
void bItemDrop_ExternalScreen(char cItemID, short msX, short msY);
void CreateScreenShot();
void CrusadeWarResult(int iWinnerSide);
void CrusadeContributionResult(int iWarContribution);
void CannotConstruct(int iCode);
void DrawTopMsg();
void SetTopMsg(char * pString, unsigned char iLastSec);
void DrawObjectFOE(int ix, int iy, int iFrame);
void GrandMagicResult(char * pMapName, int iV1, int iV2, int iV3, int iV4, int iHP1, int iHP2, int iHP3, int iHP4) ;
void MeteorStrikeComing(int iCode);
void _Draw_OnLogin(char * pAccount, char * pPassword, int msX, int msY, int iFrame = 60000);
void DrawNewDialogBox(char cType, int sX, int sY, int iFrame, BOOL bIsNoColorKey = FALSE, BOOL bIsTrans = FALSE);
void AddMapStatusInfo(char * pData, BOOL bIsLastData);
void _RequestMapStatus(char * pMapName, int iMode);
int GetCharKind(char *str, int index);
void ReceiveString(char * pString);
void EndInputString();
void ClearInputString();
void ShowReceivedString(BOOL bIsHide = FALSE);
bool GetText(HWND hWnd,UINT msg,WPARAM wparam, LPARAM lparam);
BOOL bReadItemNameConfigFile();
void DrawDialogBoxs(short msX, short msY, short msZ, char cLB);
void DrawDialogBox_Character(short msX, short msY);//1
void DrawDialogBox_Inventory(int msX, int msY);//2
void DrawDialogBox_Magic(short msX, short msY, short msZ);//3
void DrawDialogBox_GuildMenu(short msX, short msY);//7
void DrawDialogBox_GuildOperation(short msX, short msY);//8
void DrawDialogBox_GuideMap(short msX, short msY, char cLB);//9
void DrawDialogBox_Chat(short msX, short msY, short msZ, char cLB);//10
void DrawDialogBox_Shop(short msX, short msY, short msZ, char cLB);//11
void DrawDialogBox_LevelUpSetting(short msX, short msY);//12
void DrawDialogBox_CityHallMenu(short msX, short msY);//13
void DrawDialogBox_Bank(short msX, short msY, short msZ, char cLB);//14
void DrawDialogBox_Skill(short msX, short msY, short msZ, char cLB);//15
void DrawDialogBox_MagicShop(short msX, short msY, short msZ);//16
void DrawDialogBox_QueryDropItemAmount();//17
void DrawDialogBox_Text(short msX, short msY, short msZ, char cLB);//18
void DrawDialogBox_SysMenu(short msX, short msY, char cLB);//19
void DrawDialogBox_NpcActionQuery(short msX, short msY);//20
void DrawDialogBox_NpcTalk(short msX, short msY, char cLB);//21
void DrawDialogBox_Map();//22
void DrawDialogBox_SellorRepairItem(short msX, short msY);//23
void DrawDialogBox_Fishing(short msX, short msY);//24
void DrawDialogBox_ShutDownMsg(short msX, short msY);//25
void DrawDialogBox_SkillDlg(short msX, short msY, short msZ, char cLB);//26
void DrawDialogBox_Exchange(short msX, short msY);//27
void DrawDialogBox_Quest(int msX, int msY);//28
void DrawDialogBox_GaugePannel();//29
void DrawDialogBox_IconPannel(short msX, short msY);//30
void DrawDialogBox_SellList(short msX, short msY);//31
void DrawDialogBox_Party(short msX, short msY);//32
void DrawDialogBox_CrusadeJob(short msX, short msY);//33
void DrawDialogBox_ItemUpgrade(int msX, int msY);//34
void DrawDialogBox_Help(int msX, int msY);//35
void DrawDialogBox_Commander(int msX, int msY);//36
void DrawDialogBox_Constructor(int msX, int msY);//37
void DrawDialogBox_Soldier(int msX, int msY);//38
void DrawDialogBox_ItemDrop(short msX, short msY);//4 沥柳堡.
void DrawDialogBox_WarningMsg(short msX, short msY);//6 沥柳堡.
void DrawDialogBox_15AgeMsg(short msX, short msY);//5 沥柳堡.
void DrawDialogBox_FeedBackCard(short msX, short msY);//40 沥柳堡.
void DisplayGold(int iGold);//5 沥柳堡.
BOOL _bCheckDlgBoxClick(short msX, short msY);
void DlgBoxClick_WarningMsg(short msX, short msY);
void DlgBoxClick_15AgeMsg(short msX, short msY);// 沥柳堡.
void DlgBoxClick_ItemDrop(short msX, short msY);// 沥柳堡.
void DlgBoxClick_Character(short msX, short msY);
void DlgBoxClick_Inventory(short msX, short msY);
void DlgBoxClick_Magic(short msX, short msY);
void DlgBoxClick_GuildMenu(short msX, short msY);
void DlgBoxClick_GuildOp(short msX, short msY);
void DlgBoxClick_Shop(short msX, short msY);
void DlgBoxClick_LevelUpSettings(short msX, short msY);
void DlgBoxClick_CityhallMenu(short msX, short msY);
void DlgBoxClick_Bank(short msX, short msY);
void DlgBoxClick_Skill(short msX, short msY);
void DlgBoxClick_MagicShop(short msX, short msY);
void DlgBoxClick_FeedBackCard(short msX, short msY);
void DlgBoxClick_Text(short msX, short msY);
void DlgBoxClick_SysMenu(short msX, short msY);
void DlgBoxClick_NpcActionQuery(short msX, short msY);
void DlgBoxClick_NpcTalk(int msX, int msY);
void DlgBoxClick_ItemSellorRepair(short msX, short msY);
void DlgBoxClick_Fish(short msX, short msY);
void DlgBoxClick_ShutDownMsg(short msX, short msY);
void DlgBoxClick_SkillDlg(short msX, short msY);
void DlgBoxClick_Exchange(short msX, short msY);
void DlgBoxClick_Quest(int msX, int msY);
void DlgBoxClick_SellList(short msX, short msY);
void DlgBoxClick_IconPannel(short msX, short msY);
void DlgBoxClick_Party(short msX, short msY);
void DlgBoxClick_CrusadeJob(short msX, short msY);
void DlgBoxClick_ItemUpgrade(int msX, int msY);
void DlgBoxClick_Help(int msX, int msY);
void DlgBoxClick_Commander(int msX, int msY);
void DlgBoxClick_Constructor(int msX, int msY);
void DlgBoxClick_Soldier(int msX, int msY);
void NotifyMsgHandler(char * pData);
void NotifyMsg_GlobalAttackMode(char * pData);
void NotifyMsg_QuestReward(char * pData);
void NotifyMsg_QuestContents(char * pData);
void NotifyMsg_ItemColorChange(char * pData);
void NotifyMsg_DropItemFin_CountChanged(char * pData);
void NotifyMsg_CannotGiveItem(char * pData);
void NotifyMsg_GiveItemFin_CountChanged(char * pData);
void NotifyMsg_SetExchangeItem(char * pData);
void NotifyMsg_OpenExchageWindow(char * pData);
void NotifyMsg_DownSkillIndexSet(char * pData);
void NotifyMsg_AdminInfo(char * pData);
void NotifyMsg_WhetherChange(char * pData);
void NotifyMsg_FishChance(char * pData);
void NotifyMsg_EventFishMode(char * pData);
void NotifyMsg_NoticeMsg(char * pData);
void NotifyMsg_RatingPlayer(char * pData);
void NotifyMsg_CannotRating(char * pData);
void NotifyMsg_PlayerShutUp(char * pData);
void NotifyMsg_TimeChange(char * pData);
void NotifyMsg_Hunger(char * pData);
void NotifyMsg_PlayerProfile(char * pData);
void NotifyMsg_WhisperMode(BOOL bActive, char * pData);
void NotifyMsg_PlayerStatus(BOOL bOnGame, char * pData);
void NotifyMsg_Charisma(char * pData);
void NotifyMsg_ItemRepaired(char * pData);
void NotifyMsg_RepairItemPrice(char * pData);
void NotifyMsg_CannotRepairItem(char * pData);
void NotifyMsg_CannotSellItem(char * pData);
void NotifyMsg_SellItemPrice(char * pData);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -