Пример #1
0
void readEntitiesEditor(FILE* f)
{
	int i; u16 cnt;
	removeEntities();
	fread(&cnt,sizeof(u16),1,f);
	for(i=0;i<cnt;i++)
	{
		readEntityEditor(f);
	}
}
Пример #2
0
void NpcAnimation::removeIndividualPart(int type)
{
    mPartPriorities[type] = 0;
    mPartslots[type] = -1;

    for(size_t i = 0;i < sPartListSize;i++)
    {
        if(type == sPartList[i].type)
        {
            removeEntities(mEntityParts[i]);
            break;
        }
    }
}
void CommandLineInterface::mainMenu() {
  while (true) {
    std::cout << "\n";
    std::cout << "Type a command (type 'help' or 'h' for help)" << std::endl;
    std::cout << "\n";
    std::cout << "> ";
    std::string input;
    std::getline(std::cin, input);
    std::vector<std::string> args = string_utils::split(input);
    if (args.empty()) {
      std::cout << "Invalid input." << std::endl;
    } else {
      std::string command = args[0];
      args.erase(args.begin());
      clearScreen();
      if (command == "create") {
        createEntities(args);
      } else if (command == "remove" || command == "delete") {
        removeEntities(args);
      } else if (command == "list" || command == "l") {
        listEntities(args);
      } else if (command == "setq") {
        setQueue(args);
      } else if (command == "unsetq") {
        unsetQueue(args);
      } else if (command == "start") {
        startQueueHandler(args);
      } else if (command == "stop") {
        stopQueueHandler(args);
      } else if (command == "watch" || command == "w") {
        watch();
      } else if (command == "help" || command == "h") {
        showHelp();
      } else if (command == "quit" || command == "q") {
        std::cout << "Bye." << std::endl;
        break;
      } else {
        std::cout << "Sorry. Command not recognized." << std::endl;
      }
    }
  }
}
Пример #4
0
GrassPage::~GrassPage()
{
  removeEntities();
}
Пример #5
0
	void EntityManager::update(float deltaTime, sf::RenderWindow &window, int playerId)
	{
		updateEntities(deltaTime, window, playerId);
		removeEntities();
	}
Пример #6
0
void NpcAnimation::removeIndividualPart(int type)
{
    mPartPriorities[type] = 0;
    mPartslots[type] = -1;

    if(type == ESM::PRT_Head)   //0
        removeEntities(head);
    else if(type == ESM::PRT_Hair) //1
        removeEntities(hair);
    else if(type == ESM::PRT_Neck) //2
        removeEntities(neck);
    else if(type == ESM::PRT_Cuirass)//3
        removeEntities(chest);
    else if(type == ESM::PRT_Groin)//4
        removeEntities(groin);
    else if(type == ESM::PRT_Skirt)//5
        removeEntities(skirt);
    else if(type == ESM::PRT_RHand)//6
        removeEntities(rHand);
    else if(type == ESM::PRT_LHand)//7
        removeEntities(lHand);
    else if(type == ESM::PRT_RWrist)//8
        removeEntities(rWrist);
    else if(type == ESM::PRT_LWrist) //9
        removeEntities(lWrist);
    else if(type == ESM::PRT_Shield) //10
    {
    }
    else if(type == ESM::PRT_RForearm) //11
        removeEntities(rForearm);
    else if(type == ESM::PRT_LForearm) //12
        removeEntities(lForearm);
    else if(type == ESM::PRT_RUpperarm) //13
        removeEntities(rupperArm);
    else if(type == ESM::PRT_LUpperarm) //14
        removeEntities(lupperArm);
    else if(type == ESM::PRT_RFoot)                 //15
        removeEntities(rfoot);
    else if(type == ESM::PRT_LFoot)                //16
        removeEntities(lfoot);
    else if(type == ESM::PRT_RAnkle)    //17
        removeEntities(rAnkle);
    else if(type == ESM::PRT_LAnkle)    //18
        removeEntities(lAnkle);
    else if(type == ESM::PRT_RKnee)    //19
        removeEntities(rKnee);
    else if(type == ESM::PRT_LKnee)    //20
        removeEntities(lKnee);
    else if(type == ESM::PRT_RLeg)    //21
        removeEntities(rUpperLeg);
    else if(type == ESM::PRT_LLeg)    //22
        removeEntities(lUpperLeg);
    else if(type == ESM::PRT_RPauldron)    //23
        removeEntities(rclavicle);
    else if(type == ESM::PRT_LPauldron)    //24
        removeEntities(lclavicle);
    else if(type == ESM::PRT_Weapon)                 //25
    {
    }
    else if(type == ESM::PRT_Tail)    //26
        removeEntities(tail);
}
Пример #7
0
NpcAnimation::~NpcAnimation()
{
    removeEntities(head);
    removeEntities(hair);
    removeEntities(neck);
    removeEntities(chest);
    removeEntities(groin);
    removeEntities(skirt);
    removeEntities(rHand);
    removeEntities(lHand);
    removeEntities(rWrist);
    removeEntities(lWrist);
    removeEntities(rForearm);
    removeEntities(lForearm);
    removeEntities(rupperArm);
    removeEntities(lupperArm);
    removeEntities(rfoot);
    removeEntities(lfoot);
    removeEntities(rAnkle);
    removeEntities(lAnkle);
    removeEntities(rKnee);
    removeEntities(lKnee);
    removeEntities(rUpperLeg);
    removeEntities(lUpperLeg);
    removeEntities(rclavicle);
    removeEntities(lclavicle);
    removeEntities(tail);
}
Пример #8
0
NpcAnimation::~NpcAnimation()
{
    for(size_t i = 0;i < sPartListSize;i++)
        removeEntities(mEntityParts[i]);
}