Ejemplo n.º 1
0
//------------------------------------------------------------------------------
//! \brief Do the object
//------------------------------------------------------------------------------
void CEndBoss::Do( void )
{
	if (RunDoSuck()) return;

	CheckKillPlayer();
	if (!(m_Y_Flag))	// Only move if on ground
	{
		DirWalk();
	}
	MoveObject();
	AnimateXInert(anm_lboss_left, anm_lboss_right);

	// Check if suckable
	if (!m_pNextSeg)
	{
		ControlDay();
		m_Flags = FLAG_BADDIE | FLAG_CATCHABLE;
	}

	// Control Main Segments Hat
	if (!m_Segment)
	{
		if (m_HatFrame)
		{
			if (m_Dir==DIR_LEFT) m_HatFrame = SPR_LBOSS_DLEFT;
			else m_HatFrame = SPR_LBOSS_DRIGHT;
		}
	}
}
Ejemplo n.º 2
0
void checkXml()
{
	SE_ResourceManager* resourceManager = SE_Application::getInstance()->getResourceManager();
	std::string inputDir = resourceManager->getLayoutPath();
	std::string outputDir = resourceManager->getDataPath();
	std::string outputFilePath = outputDir + SE_SEP + "checkxmlresult.txt";
	FILE* f = fopen(outputFilePath.c_str(), "w");
	if(!f)
	{
		LOGI("can not open output file : %s\n", outputFilePath.c_str());
		return;
	}
	outputFile = f;
    TCHAR inputDirWideChar[512];
	memset(inputDirWideChar, 0, sizeof(TCHAR) * 512);
	MultiByteToWideChar(CP_ACP, 0, inputDir.c_str(), -1, inputDirWideChar, 511);
	DirWalk(inputDirWideChar, false);
	std::string inputStr = inputDir;
	std::list<_FileNameData>::iterator it ;
	for(it = fileNameList.begin() ; it != fileNameList.end() ; it++)
	{
		_FileNameData fnd = *it;
		std::string fileName = wcharToMultiByte(fnd.buf);
		std::string filePath = fileName;
		if(fileName != "")
		{
		    handleContent(filePath.c_str());
		}
	}
	fclose(f);
}
Ejemplo n.º 3
0
void DirWalk(sDiskItem *dir,sInt indent)
{
  sDiskItem *file;
  sInt i,j;
  sChar name[128];

  if(indent<2)
    dir->Cmd(sDIC_FINDALL,0,0);

  i=0;
  for(i=0;;i++)
  {
    file = dir->GetChild(i);
    if(!file)
      break;
    for(j=0;j<indent;j++)
      sDPrintF("  ");
    file->GetString(sDIA_NAME,name,sizeof(name));
    if(file->GetBool(sDIA_ISDIR))
    {
      sDPrintF("[%s]\n",name);
      DirWalk(file,indent+1);
    }
    else
    {
      sDPrintF("%s %d\n",name,file->GetBinarySize(sDIA_DATA));
    }
  }
}