コード例 #1
0
void CMetalMap::Init() {
	// leave this line if you want to use this class in your AI
	ai -> cb -> SendTextMsg("KAI Metal Class by Krogothe", 0);

	// if there's no available load file, create one and save it
	if (!LoadMetalMap()) {
		GetMetalPoints();
		SaveMetalMap();

		string mapname =  string("Metal - ") + ai -> cb -> GetMapName();
		mapname.resize(mapname.size() - 4);
		// ai -> debug -> MakeBWTGA(MexArrayC, MetalMapWidth, MetalMapHeight, mapname);
	}

	char k[256];
	sprintf(k, "Metal Spots Found %i", NumSpotsFound);
	ai -> cb -> SendTextMsg(k, 0);
}
コード例 #2
0
ファイル: MetalMap.cpp プロジェクト: spring/KAIK
void CMetalMap::Init() {
	//const int frame = ai->cb->GetCurrentFrame();

	// leave this line if you want to use this class in your AI
	ai->cb->SendTextMsg("KAI Metal Class by Krogothe", 0);

	// if there's no available load file, create one and save it
	if (!LoadMetalMap()) {
		GetMetalPoints();
		SaveMetalMap();

		// std::string mapname = std::string("Metal - ") + ai->cb->GetMapName();
		// mapname.resize(mapname.size() - 4);
		// ai->debug->MakeBWTGA(MexArrayC, MetalMapWidth, MetalMapHeight, mapname);
	}

	std::stringstream msg;
		msg << "[CMetalMap::Init()] number of metal spots found: " << NumSpotsFound << "\n";
	ai->GetLogger()->Log(msg.str());
}