Example #1
0
void NzSkeletalMesh::Skin(NzMeshVertex* outputBuffer) const
{
	#if NAZARA_UTILITY_SAFE
	if (!m_impl)
	{
		NazaraError("Skeletal mesh not created");
		return;
	}
	#endif

	Skin(outputBuffer, m_parent->GetSkeleton());
}
Example #2
0
CharacterGenerationInfo *CharacterGenerationInfo::createRandomMaleGuardian() {
	CharacterGenerationInfo *info = new CharacterGenerationInfo();
	info->_gender = kGenderMale;
	info->_class = kClassJediGuardian;
	info->_skin = Skin(std::rand() % kSkinMAX);
	switch (info->_skin) {
		case kSkinH:
			info->_face = std::rand() % 2;
			break;
		default:
			info->_face = std::rand() % 5;
			break;
	}

	Aurora::LTRFile humanMale("humanm");
	Aurora::LTRFile humanLast("humanl");

	info->_name = humanMale.generateRandomName(8) + " " + humanLast.generateRandomName(8);

	return info;
}
Example #3
0
void CharacterGenerationPortraitMenu::callbackActive(Widget &widget) {
	if (widget.getTag() == "BTN_ACCEPT") {
		accept();
		_returnCode = kReturnCodeAbort;
		return;
	}
	if (widget.getTag() == "BTN_CANCEL") {
		_returnCode = kReturnCodeAbort;
		return;
	}

	if (widget.getTag() == "BTN_ARRL") {
		// Get the current skin and face
		Skin skin = _info.getSkin();
		unsigned int face = _info.getFace();

		// Move them to left and go in another skin type if needed
		if (face == 0) {
			if (skin == kSkinA)
				skin = kSkinH;
			else
				skin = Skin(skin - 1);

			if (skin == kSkinH)
				face = 1;
			else
				face = 4;
		} else {
			face -= 1;
		}

		// Set the new skin and face values
		_info.setSkin(skin);
		_info.setFace(face);

		// And then reset the portrait
		getLabel("LBL_PORTRAIT")->setFill(_info.getPortrait());

		return;
	}

	if (widget.getTag() == "BTN_ARRR") {
		// Get the current skin and face
		Skin skin = _info.getSkin();
		unsigned int face = _info.getFace();

		// Move them to right and go in another skin type if needed
		if (face == ((skin == kSkinH) ? 1 : 4)) {
			if (skin == kSkinH)
				skin = kSkinA;
			else
				skin = Skin(skin + 1);
			face = 0;
		} else {
			face += 1;
		}

		// Set the new skin and face values
		_info.setSkin(skin);
		_info.setFace(face);

		// And then reset the portrait
		getLabel("LBL_PORTRAIT")->setFill(_info.getPortrait());

		return;
	}
}