Environment.h
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:1k
源码类别:

模拟服务器

开发平台:

C/C++

  1. /********************************************************************
  2. created: 2003/04/09
  3. file base: Environment
  4. file ext: h
  5. author: liupeng
  6. purpose:
  7. *********************************************************************/
  8. #ifndef __INCLUDE_ENVIRONMENT_H__
  9. #define __INCLUDE_ENVIRONMENT_H__
  10. #pragma warning( disable:4786 )
  11. #include "tstring.h"
  12. #include "S3DBInterface.h"
  13. #define NEW_PLAYER_KIND 10
  14. using OnlineGameLib::Win32::_tstring;
  15. #include <string>
  16. #include <map>
  17. using namespace std;
  18. typedef map< _tstring, _tstring > _tssmap;
  19. typedef _tssmap::iterator _tssmap_it;
  20. typedef struct tagEnvironment
  21. {
  22. long lnPlayerMaxCount;
  23. long lnPrecision;
  24. _tstring sLocalName;
  25. _tstring sLocalAddress0;
  26. _tstring sLocalAddress1;
  27. _tstring sApplicationPath;
  28. /*
  29.  * Draw
  30.  */
  31. _tssmap mShowInfo;
  32. /*
  33.  * Network
  34.  */
  35. _tstring sAccountServerIP;
  36. _tstring sRoleDBServerIP;
  37. unsigned short usAccSvrPort;
  38. unsigned short usRoleDBSvrPort;
  39. unsigned short usClientOpenPort;
  40. unsigned short usGameSvrOpenPort;
  41. /*
  42.  * Setting
  43.  */
  44. TRoleData theRoleData[NEW_PLAYER_KIND];
  45. /*
  46.  * Config file
  47.  */
  48. char szConfigFileName[MAX_PATH];
  49. }ENVIRONMENT, NEAR *PENVIRONMENT, FAR *LPENVIRONMENT;
  50. extern ENVIRONMENT g_theEnviroment;
  51. bool LoadEnvironmentVariable( HINSTANCE hParentInst );
  52. bool SaveEnvironmentVariable();
  53. #endif // __INCLUDE_ENVIRONMENT_H__