WeaponClass.cpp
上传用户:garry_shen
上传日期:2015-04-15
资源大小:45647k
文件大小:3k
源码类别:

游戏引擎

开发平台:

Visual C++

  1. // WeaponClass.cpp: implementation of the CWeaponClass class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #include "stdafx.h"
  5. #include "WeaponClass.h"
  6. //////////////////////////////////////////////////////////////////////
  7. // Construction/Destruction
  8. //////////////////////////////////////////////////////////////////////
  9. CWeaponClass::CWeaponClass()
  10. {
  11. }
  12. CWeaponClass::~CWeaponClass()
  13. {
  14. //   delete lpGoods; 
  15. //   delete lpWeapon;
  16. }
  17. void CWeaponClass::InitWeapon(char *szFileName)
  18. {
  19. FILE *fp;
  20. char szBuf[100];
  21. CString szStr;
  22. int nValue =0;
  23. TGoods *Goods;
  24.     TWeapon *Weapon;
  25. Goods = new TGoods;
  26. Weapon = new TWeapon;
  27. Goods->nKinds = GK_weapon; //贺摸
  28. fp = fopen(szFileName,"r");
  29. if(fp!=NULL)
  30. {
  31. while(fscanf(fp,"%s",szBuf)!=EOF)
  32. {
  33. szStr = szBuf;
  34. if(szStr=="いゅ