CharacterProcess.h
上传用户:cydong117
上传日期:2009-11-10
资源大小:638k
文件大小:3k
源码类别:

模拟服务器

开发平台:

Visual C++

  1. // CharacterProcess.h: interface for the CCharacterProcess class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_CHARACTERPROCESS_H__70098477_5700_4CC3_88C4_5E7460A1F63A__INCLUDED_)
  5. #define AFX_CHARACTERPROCESS_H__70098477_5700_4CC3_88C4_5E7460A1F63A__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. //#define ANITICK 200
  10. class CCharacterProcess: public CWHDefProcess  
  11. {
  12. public:
  13. CCharacterProcess();
  14. virtual ~CCharacterProcess();
  15. VOID Init();
  16. VOID Load();
  17. // Message Function
  18. LRESULT OnKeyDown(WPARAM wParam, LPARAM lParam);
  19. LRESULT OnLButtonDown(WPARAM wParam, LPARAM lParam);
  20. LRESULT OnLButtonUp(WPARAM wParam, LPARAM lParam);
  21. LRESULT OnSocketMessage(WPARAM wParam,LPARAM lParam);
  22. LRESULT OnMouseOn(WPARAM wParam,LPARAM lParam);
  23. LRESULT OnWindowMove(WPARAM wParam,LPARAM lParam);
  24. LRESULT OnMouseMove(WPARAM wParam,LPARAM lParam);
  25. void OnSocketMessageRecieve(char* pszMsg);
  26. virtual VOID OnConnectToServer();
  27. virtual char* OnMessageReceive(CHAR* pszMessage);
  28. virtual LRESULT DefMainWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  29. // Socket
  30. BOOL ConnectServer(SOCKET &s, SOCKADDR_IN* addr, UINT nMsgID, LPCTSTR lpServerIP, DWORD dwIP, int nPort, long lEvent);
  31. // Process control
  32. VOID DeleteProc();
  33. VOID SetNextProc();
  34. // Scene Renders
  35. VOID RenderScene(INT nLoopTime);
  36. VOID RenderCharCreate(INT nLoopTime);
  37. VOID SetErrorMessage(INT nMsg,CHAR* szMgs);
  38. virtual VOID ShowStatus(INT nStartX, INT nStartY);
  39. BOOL MessageBoxProcess(LPARAM lParam);
  40. private:
  41. CBackGround m_xBGround;
  42. CSelectChr m_xSelectChr;
  43. char m_ServerIP[15];
  44. WSADATA m_wsd;
  45. CWHWilImageData m_Image;
  46. CWHWilImageData m_Image2;
  47. CWHWilImageData m_tImage1; // 烙矫
  48. int m_Progress;
  49. SOCKET  m_LoginSocket;
  50. SOCKADDR_IN m_LoginAddress;
  51. UINT m_ButtonID;
  52. POINT m_ptMousePos;
  53. int m_ConnectionState; // 0: not login.
  54. // 1: login success.
  55. // 2: login fail etc.
  56. BOOL m_fIsLButtonClicked;
  57. CPDLList<CHRINFO> m_CList; // 纳腐磐 Info 历厘 List
  58. CPDLList<CHRRECT> m_CRectList; // 纳腐磐 Rect 历厘 List
  59. // Buttons
  60. CMirButton *m_pBtn;
  61. INT m_nMessage; // Error Message Box Index
  62. BYTE m_SelectJob; // 积己芒俊辑 急琶等 流诀
  63. BYTE m_SelectSex; // 积己芒俊辑 急琶等 己喊
  64. INT m_SelectChr; // 急氓芒俊辑 急琶等 纳腐磐 锅龋
  65. INT m_ChrCount; // 孽府肺 罐绢柯 纳腐磐 箭磊
  66. char m_szChrName[16];
  67. CHAR m_szErrorMsg[512];
  68. int m_Distance;
  69. INT m_Tick;
  70. POINT m_PosName;
  71. CMirMsgBox3D m_xMsgBox;
  72. /* CAvi m_xCreateChrAvi; // For Create Charector
  73. CAvi m_xStartGameAvi; // For Create Start Game*/
  74. }; 
  75. #endif // !defined(AFX_CHARACTERPROCESS_H__70098477_5700_4CC3_88C4_5E7460A1F63A__INCLUDED_)