

#include "Hero.h"
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include "PublicFun.h"

extern  PAINTSTRUCT ps;
extern 	HDC hdc;
extern 	HBITMAP hbmp; 
extern 	HBITMAP hbmp2; 
extern 	BITMAP bmp;
extern 	HDC hdcMem;
extern 	HDC hdcTmp;
extern 	RECT rect;
extern 	HWND hwnd;

using namespace std;

/***********************************************************************
 * 说明:     Hero类初始化数据函数
 * 输入参数: int choice——所选择历史时期，int number——城市序号
 * 返回值  : 无
 * 功能	   : 初始化数据
 * 修改历史:
 *               姓名            日期             说明
 *             ------          ----------      -------------
 *             wstjb          2012-10-20       完成基本功能
***********************************************************************/
void Hero::InitData(int choice,int number)
{
	//wlogfile(1,__FUNCTION__,"开始",0);
	/*char name[NORMALSTRLEN];	 
	if (choice==DZNQ)sprintf_s(name,"%s","Res\\Hero\\hero1.sdt");
	if (choice==CCJQ)sprintf_s(name,"%s","Res\\Hero\\hero2.sdt");
	if (choice==CBZZ)sprintf_s(name,"%s","Res\\Hero\\hero3.sdt");
	if (choice==SGDL)sprintf_s(name,"%s","Res\\Hero\\hero4.sdt");
	ifstream infile(name,ios::in);
	for(int g=0;g<HEROMAX;g++)
	{
		
			infile>>no;
			infile>>owner;
			infile>>degree;
			if(degree>20)degree=0;
			infile>>wuli;
			if(wuli>200)wuli=1;
			infile>>zili;
			if(zili>200)zili=1;
			infile>>heart;
			if(heart>100)heart=1;
			infile>>charcter;
			infile>>experience;
			infile>>tili;
			tili=100;
			infile>>style;
			infile>>bingli;
			infile>>goods1;
			infile>>goods2;
			infile>>age;
			infile>>hiscity;
			inlistflag=1;
			speedup=0;
			switch(goods1)
			{
			case 23:
				speedup=3;
				break;
			case 24:
			case 25:
				speedup=2;
				break;
			case 26:
			case 27:
			case 28:
			case 29:
			case 30:
				speedup=1;
				break;
			}
			switch(goods2)
			{
			case 23:
				speedup=3;
				break;
			case 24:
			case 25:
				speedup=2;
				break;
			case 26:
			case 27:
			case 28:
			case 29:
			case 30:
				speedup=1;
				break;
			}
			infile>>hisfinder;
			iscaptive = 0;
			if(no==number)
			{
				break;
			}
			
	}
	infile.close();*/
	//ChangeRes(name);

		 
}




