Skip to content

Commit

Permalink
KOTOR2: Generate random names in chargen info class
Browse files Browse the repository at this point in the history
  • Loading branch information
Nostritius authored and DrMcCoy committed Jul 16, 2018
1 parent 4ba84e6 commit f8ea991
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions src/engines/kotor2/gui/chargen/chargeninfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "src/common/error.h"
#include "src/common/scopedptr.h"

#include "src/aurora/ltrfile.h"

#include "chargeninfo.h"

namespace Engines {
Expand All @@ -45,6 +47,12 @@ CharacterGenerationInfo *CharacterGenerationInfo::createRandomMaleConsular() {
info->_face = std::rand() % 5;
break;
}

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

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

return info;
}

Expand All @@ -61,6 +69,12 @@ CharacterGenerationInfo *CharacterGenerationInfo::createRandomFemaleConsular() {
info->_face = std::rand() % 5;
break;
}

Aurora::LTRFile humanFemale("humanf");
Aurora::LTRFile humanLast("humanl");

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

return info;
}

Expand All @@ -77,6 +91,12 @@ CharacterGenerationInfo *CharacterGenerationInfo::createRandomMaleGuardian() {
info->_face = std::rand() % 5;
break;
}

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

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

return info;
}

Expand All @@ -93,6 +113,12 @@ CharacterGenerationInfo *CharacterGenerationInfo::createRandomFemaleGuardian() {
info->_face = std::rand() % 5;
break;
}

Aurora::LTRFile humanFemale("humanf");
Aurora::LTRFile humanLast("humanl");

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

return info;
}

Expand All @@ -109,6 +135,12 @@ CharacterGenerationInfo *CharacterGenerationInfo::createRandomMaleSentinel() {
info->_face = std::rand() % 5;
break;
}

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

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

return info;
}

Expand All @@ -125,6 +157,12 @@ CharacterGenerationInfo *CharacterGenerationInfo::createRandomFemaleSentinel() {
info->_face = std::rand() % 5;
break;
}

Aurora::LTRFile humanFemale("humanf");
Aurora::LTRFile humanLast("humanl");

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

return info;
}

Expand Down

0 comments on commit f8ea991

Please sign in to comment.