예제 #1
0
파일: OFIRMRES.cpp 프로젝트: Stummi/7kaa
//---------- Begin of function FirmRes::init -----------//
//
// This function must be called after a map is generated.
//
void FirmRes::init()
{
	deinit();

	//----- open firm material bitmap resource file -------//

	String str;

	str  = DIR_RES;
	str += "I_FIRM.RES";

	res_bitmap.init_imported(str,1);  // 1-read all into buffer

	//------- load database information --------//

	load_firm_bitmap();		// call load_firm_bitmap() first as load_firm_info() will need info loaded by load_firm_bitmap()
	load_firm_build();
	load_firm_info();

	//------------ set firm skill ------------//

	firm_res[FIRM_BASE]->firm_skill_id = SKILL_LEADING;
	firm_res[FIRM_CAMP]->firm_skill_id = SKILL_LEADING;
	firm_res[FIRM_MINE]->firm_skill_id = SKILL_MINING;
	firm_res[FIRM_FACTORY]->firm_skill_id = SKILL_MFT;
	firm_res[FIRM_RESEARCH]->firm_skill_id = SKILL_RESEARCH;
	firm_res[FIRM_WAR_FACTORY]->firm_skill_id = SKILL_MFT;

   //----------------------------------------//

	init_flag=1;
}
예제 #2
0
파일: ofirmres.cpp 프로젝트: 112212/7k2
//---------- Begin of function FirmRes::init -----------//
//
// This function must be called after a map is generated.
//
void FirmRes::init()
{
	deinit();

	//----- open firm material bitmap resource file -------//

	String str;

//	str  = DIR_RES;
//	str += "I_FIRM.RES";

//	res_bitmap.init_imported(str,1);  // 1-read all into buffer

	str  = DIR_RES;
	if (config.building_size == 1)	
		str += "PAL_FIRM.RES";
	else
		str += "PALFIRM2.RES";

	res_pal.init_imported(str,1);		// 1-read all into buffer

	//------- load database information --------//

	load_firm_bitmap();		// call load_firm_bitmap() first as load_firm_info() will need info loaded by load_firm_bitmap()
	load_firm_build();
	load_firm_group();
	load_firm_info();

	// -------- set same race worker --------//

	firm_res[FIRM_BASE]->same_race_worker = 1;
	firm_res[FIRM_SPECIAL]->same_race_worker = 1;

	//----------------------------------------//

	init_flag=1;
}