xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Engines::NWN::CharGenChoices Class Reference

#include <chargenchoices.h>

Collaboration diagram for Engines::NWN::CharGenChoices:
Collaboration graph
[legend]

Public Member Functions

 CharGenChoices ()
 
 ~CharGenChoices ()
 
void applyChoices ()
 
void reset ()
 
void resetPackage ()
 
const CreaturegetCharacter ()
 
void setGender (Gender gender)
 
void setRace (uint32 race)
 
void setPortrait (const Common::UString &portrait)
 
void setClass (uint32 classId)
 
void setAlign (uint8 goodness, uint8 lawfulness)
 
void setAbilities (std::vector< uint8 > abilities, std::vector< uint8 > racialAbilities)
 
void setPackage (uint8 package)
 
void setSkill (size_t skillIndex, uint8 rank)
 
void setNotUsedSkills (uint8 notUsedSkills)
 
void setFeat (uint32 feat)
 
void setSpellSchool (uint8 spellSchool)
 
void setDomains (uint8 domain1, uint8 domain2)
 
void setSpell (size_t spellLevel, uint16 spell)
 
void setSoundSet (uint32 soundSetID)
 
void useCharacter (Module *module)
 
bool hasFeat (uint32 featId) const
 
bool hasPrereqFeat (uint32 featId, bool isClassFeat)
 
uint32 getClass () const
 
uint32 getRace () const
 
bool getAlign (uint8 &goodness, uint8 &lawfulness) const
 
uint8 getAbility (Ability ability) const
 
uint8 getTotalAbility (Ability ability) const
 
int8 getAbilityModifier (Ability ability)
 
void getFeats (std::vector< uint32 > &feats)
 
uint8 getPackage () const
 
uint8 getSpellSchool () const
 
void getPrefFeats (std::vector< uint32 > &feats)
 
uint8 getPrefSpellSchool ()
 
void getPrefSkills (std::vector< uint8 > &skills)
 
void getPrefDomains (uint8 &domain1, uint8 &domain2)
 
void getPrefSpells (std::vector< std::vector< uint16 > > &spells)
 
uint8 computeAvailSkillRank ()
 
void getSkillItems (std::vector< SkillItem > &skills)
 
void getFeatItems (std::list< FeatItem > &feats, uint8 &normalFeats, uint8 &bonusFeats)
 

Private Member Functions

void init ()
 

Private Attributes

Creature_creature
 
std::vector< std::vector< uint16 > > _spells
 
std::vector< uint32_normalFeats
 
std::vector< uint32_racialFeats
 
std::vector< uint32_classFeats
 
std::vector< uint8_abilities
 
std::vector< uint8_racialAbilities
 
std::vector< uint8_skills
 
uint32 _classId
 
uint32 _soundSet
 
uint8 _goodness
 
uint8 _lawfulness
 
uint8 _package
 
uint8 _notUsedSkills
 
uint8 _spellSchool
 
uint8 _domain1
 
uint8 _domain2
 
bool _characterUsed
 

Detailed Description

Definition at line 69 of file chargenchoices.h.

Constructor & Destructor Documentation

◆ CharGenChoices()

Engines::NWN::CharGenChoices::CharGenChoices ( )

Definition at line 46 of file chargenchoices.cpp.

References _creature, and init().

Here is the call graph for this function:

◆ ~CharGenChoices()

Engines::NWN::CharGenChoices::~CharGenChoices ( )

Definition at line 52 of file chargenchoices.cpp.

References _characterUsed, and _creature.

Member Function Documentation

◆ applyChoices()

void Engines::NWN::CharGenChoices::applyChoices ( )

◆ computeAvailSkillRank()

uint8 Engines::NWN::CharGenChoices::computeAvailSkillRank ( )

Definition at line 560 of file chargenchoices.cpp.

References _classId, _creature, getAbilityModifier(), Engines::NWN::Creature::getHitDice(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), hasFeat(), Engines::NWN::kAbilityIntelligence, and TwoDAReg.

Referenced by Engines::NWN::CharSkills::createSkillsList().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAbility()

uint8 Engines::NWN::CharGenChoices::getAbility ( Ability  ability) const

Definition at line 455 of file chargenchoices.cpp.

References _abilities.

Referenced by hasPrereqFeat(), and Engines::NWN::CharAttributes::hide().

Here is the caller graph for this function:

◆ getAbilityModifier()

int8 Engines::NWN::CharGenChoices::getAbilityModifier ( Ability  ability)

Definition at line 463 of file chargenchoices.cpp.

References getTotalAbility().

Referenced by computeAvailSkillRank(), and Engines::NWN::CharSpells::computeRemainingSpells().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAlign()

bool Engines::NWN::CharGenChoices::getAlign ( uint8 goodness,
uint8 lawfulness 
) const

Definition at line 445 of file chargenchoices.cpp.

References _goodness, and _lawfulness.

Referenced by Engines::NWN::CharAlignment::hide().

Here is the caller graph for this function:

◆ getCharacter()

const Creature & Engines::NWN::CharGenChoices::getCharacter ( )

◆ getClass()

uint32 Engines::NWN::CharGenChoices::getClass ( ) const

◆ getFeatItems()

void Engines::NWN::CharGenChoices::getFeatItems ( std::list< FeatItem > &  feats,
uint8 normalFeats,
uint8 bonusFeats 
)

◆ getFeats()

void Engines::NWN::CharGenChoices::getFeats ( std::vector< uint32 > &  feats)

Definition at line 478 of file chargenchoices.cpp.

References _classFeats, and _racialFeats.

Referenced by Engines::NWN::CharFeats::makeKnownList().

Here is the caller graph for this function:

◆ getPackage()

uint8 Engines::NWN::CharGenChoices::getPackage ( ) const

Definition at line 470 of file chargenchoices.cpp.

References _package.

◆ getPrefDomains()

void Engines::NWN::CharGenChoices::getPrefDomains ( uint8 domain1,
uint8 domain2 
)

Definition at line 524 of file chargenchoices.cpp.

References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), TwoDAReg, and UINT8_MAX.

Referenced by setPackage(), and Engines::NWN::CharDomain::setRecommendedDomains().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPrefFeats()

void Engines::NWN::CharGenChoices::getPrefFeats ( std::vector< uint32 > &  feats)

Definition at line 493 of file chargenchoices.cpp.

References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), hasFeat(), hasPrereqFeat(), TwoDAReg, and UINT8_MAX.

Referenced by setPackage(), and Engines::NWN::CharFeats::setRecommendedFeats().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPrefSkills()

void Engines::NWN::CharGenChoices::getPrefSkills ( std::vector< uint8 > &  skills)

Definition at line 514 of file chargenchoices.cpp.

References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), TwoDAReg, and UINT8_MAX.

Referenced by setPackage(), and Engines::NWN::CharSkills::setRecommendedSkills().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPrefSpells()

void Engines::NWN::CharGenChoices::getPrefSpells ( std::vector< std::vector< uint16 > > &  spells)

Definition at line 532 of file chargenchoices.cpp.

References _classId, _package, Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), Aurora::TwoDAFile::getRowCount(), Aurora::TwoDARow::getString(), TwoDAReg, and UINT8_MAX.

Referenced by setPackage(), and Engines::NWN::CharSpells::setRecommendedSpells().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getPrefSpellSchool()

uint8 Engines::NWN::CharGenChoices::getPrefSpellSchool ( )

Definition at line 483 of file chargenchoices.cpp.

References _classId, _package, Aurora::TwoDARow::empty(), Aurora::TwoDARow::getInt(), Aurora::TwoDAFile::getRow(), TwoDAReg, and UINT8_MAX.

Referenced by setPackage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getRace()

uint32 Engines::NWN::CharGenChoices::getRace ( ) const

Definition at line 441 of file chargenchoices.cpp.

References _creature, and Engines::NWN::Creature::getRace().

Referenced by Engines::NWN::CharAttributes::show().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getSkillItems()

void Engines::NWN::CharGenChoices::getSkillItems ( std::vector< SkillItem > &  skills)

◆ getSpellSchool()

uint8 Engines::NWN::CharGenChoices::getSpellSchool ( ) const

Definition at line 474 of file chargenchoices.cpp.

References _spellSchool.

Referenced by Engines::NWN::CharSchool::hide(), and Engines::NWN::CharSpells::makeSpellsList().

Here is the caller graph for this function:

◆ getTotalAbility()

uint8 Engines::NWN::CharGenChoices::getTotalAbility ( Ability  ability) const

Definition at line 459 of file chargenchoices.cpp.

References _abilities, and _racialAbilities.

Referenced by getAbilityModifier(), and Engines::NWN::CharSpells::makeSpellsList().

Here is the caller graph for this function:

◆ hasFeat()

bool Engines::NWN::CharGenChoices::hasFeat ( uint32  featId) const

Definition at line 335 of file chargenchoices.cpp.

References _classFeats, _creature, _normalFeats, _racialFeats, and Engines::NWN::Creature::hasFeat().

Referenced by computeAvailSkillRank(), getPrefFeats(), hasPrereqFeat(), and setClass().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hasPrereqFeat()

bool Engines::NWN::CharGenChoices::hasPrereqFeat ( uint32  featId,
bool  isClassFeat 
)

◆ init()

void Engines::NWN::CharGenChoices::init ( )
private

Definition at line 57 of file chargenchoices.cpp.

References _abilities, _classId, _goodness, _lawfulness, _notUsedSkills, _racialAbilities, _soundSet, and resetPackage().

Referenced by CharGenChoices(), and reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void Engines::NWN::CharGenChoices::reset ( )

Definition at line 135 of file chargenchoices.cpp.

References _classFeats, _creature, _racialFeats, init(), and resetPackage().

Referenced by Engines::NWN::CharGenMenu::reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetPackage()

void Engines::NWN::CharGenChoices::resetPackage ( )

Definition at line 147 of file chargenchoices.cpp.

References _domain1, _domain2, _normalFeats, _package, _skills, _spells, _spellSchool, and UINT8_MAX.

Referenced by init(), Engines::NWN::CharPackage::reset(), and reset().

Here is the caller graph for this function:

◆ setAbilities()

void Engines::NWN::CharGenChoices::setAbilities ( std::vector< uint8 abilities,
std::vector< uint8 racialAbilities 
)

Definition at line 218 of file chargenchoices.cpp.

References _abilities, and _racialAbilities.

Referenced by Engines::NWN::CharAttributes::callbackActive().

Here is the caller graph for this function:

◆ setAlign()

void Engines::NWN::CharGenChoices::setAlign ( uint8  goodness,
uint8  lawfulness 
)

Definition at line 213 of file chargenchoices.cpp.

References _goodness, and _lawfulness.

Referenced by Engines::NWN::CharAlignment::callbackActive(), and Engines::NWN::CharAlignment::reset().

Here is the caller graph for this function:

◆ setClass()

void Engines::NWN::CharGenChoices::setClass ( uint32  classId)

◆ setDomains()

void Engines::NWN::CharGenChoices::setDomains ( uint8  domain1,
uint8  domain2 
)

Definition at line 314 of file chargenchoices.cpp.

References _domain1, and _domain2.

Referenced by Engines::NWN::CharDomain::callbackActive(), and Engines::NWN::CharDomain::reset().

Here is the caller graph for this function:

◆ setFeat()

void Engines::NWN::CharGenChoices::setFeat ( uint32  feat)

Definition at line 306 of file chargenchoices.cpp.

References _normalFeats.

Referenced by Engines::NWN::CharFeats::callbackActive().

Here is the caller graph for this function:

◆ setGender()

void Engines::NWN::CharGenChoices::setGender ( Gender  gender)

Definition at line 165 of file chargenchoices.cpp.

References _creature, and Engines::NWN::Creature::setGender().

Referenced by Engines::NWN::CharSex::callbackActive().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setNotUsedSkills()

void Engines::NWN::CharGenChoices::setNotUsedSkills ( uint8  notUsedSkills)

Definition at line 302 of file chargenchoices.cpp.

References _notUsedSkills.

Referenced by Engines::NWN::CharSkills::callbackActive(), and Engines::NWN::CharSkills::reset().

Here is the caller graph for this function:

◆ setPackage()

void Engines::NWN::CharGenChoices::setPackage ( uint8  package)

◆ setPortrait()

void Engines::NWN::CharGenChoices::setPortrait ( const Common::UString portrait)

Definition at line 189 of file chargenchoices.cpp.

References _creature, and Engines::NWN::Creature::setPortrait().

Referenced by Engines::NWN::CharPortrait::callbackActive(), and Engines::NWN::CharPortrait::reset().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRace()

void Engines::NWN::CharGenChoices::setRace ( uint32  race)

◆ setSkill()

void Engines::NWN::CharGenChoices::setSkill ( size_t  skillIndex,
uint8  rank 
)

Definition at line 298 of file chargenchoices.cpp.

References _skills.

Referenced by Engines::NWN::CharSkills::callbackActive(), and Engines::NWN::CharSkills::reset().

Here is the caller graph for this function:

◆ setSoundSet()

void Engines::NWN::CharGenChoices::setSoundSet ( uint32  soundSetID)

Definition at line 326 of file chargenchoices.cpp.

References _soundSet.

Referenced by Engines::NWN::CharInfoVoice::callbackActive().

Here is the caller graph for this function:

◆ setSpell()

void Engines::NWN::CharGenChoices::setSpell ( size_t  spellLevel,
uint16  spell 
)

Definition at line 319 of file chargenchoices.cpp.

References _spells.

Referenced by Engines::NWN::CharSpells::callbackActive().

Here is the caller graph for this function:

◆ setSpellSchool()

void Engines::NWN::CharGenChoices::setSpellSchool ( uint8  spellSchool)

Definition at line 310 of file chargenchoices.cpp.

References _spellSchool.

Referenced by Engines::NWN::CharSchool::callbackActive(), Engines::NWN::CharSchool::reset(), and setPackage().

Here is the caller graph for this function:

◆ useCharacter()

void Engines::NWN::CharGenChoices::useCharacter ( Module module)

Definition at line 330 of file chargenchoices.cpp.

References _characterUsed, _creature, and Engines::NWN::Module::usePC().

Referenced by Engines::NWN::CharGenMenu::callbackActive().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _abilities

std::vector<uint8> Engines::NWN::CharGenChoices::_abilities
private

Definition at line 123 of file chargenchoices.h.

Referenced by applyChoices(), getAbility(), getTotalAbility(), init(), and setAbilities().

◆ _characterUsed

bool Engines::NWN::CharGenChoices::_characterUsed
private

Definition at line 138 of file chargenchoices.h.

Referenced by useCharacter(), and ~CharGenChoices().

◆ _classFeats

std::vector<uint32> Engines::NWN::CharGenChoices::_classFeats
private

Definition at line 122 of file chargenchoices.h.

Referenced by applyChoices(), getFeats(), hasFeat(), reset(), and setClass().

◆ _classId

uint32 Engines::NWN::CharGenChoices::_classId
private

◆ _creature

Creature* Engines::NWN::CharGenChoices::_creature
private

◆ _domain1

uint8 Engines::NWN::CharGenChoices::_domain1
private

Definition at line 134 of file chargenchoices.h.

Referenced by applyChoices(), resetPackage(), setDomains(), and setPackage().

◆ _domain2

uint8 Engines::NWN::CharGenChoices::_domain2
private

Definition at line 135 of file chargenchoices.h.

Referenced by applyChoices(), resetPackage(), setDomains(), and setPackage().

◆ _goodness

uint8 Engines::NWN::CharGenChoices::_goodness
private

Definition at line 129 of file chargenchoices.h.

Referenced by applyChoices(), getAlign(), init(), and setAlign().

◆ _lawfulness

uint8 Engines::NWN::CharGenChoices::_lawfulness
private

Definition at line 130 of file chargenchoices.h.

Referenced by applyChoices(), getAlign(), init(), and setAlign().

◆ _normalFeats

std::vector<uint32> Engines::NWN::CharGenChoices::_normalFeats
private

Definition at line 120 of file chargenchoices.h.

Referenced by applyChoices(), hasFeat(), resetPackage(), setFeat(), and setPackage().

◆ _notUsedSkills

uint8 Engines::NWN::CharGenChoices::_notUsedSkills
private

Definition at line 132 of file chargenchoices.h.

Referenced by init(), and setNotUsedSkills().

◆ _package

uint8 Engines::NWN::CharGenChoices::_package
private

◆ _racialAbilities

std::vector<uint8> Engines::NWN::CharGenChoices::_racialAbilities
private

Definition at line 124 of file chargenchoices.h.

Referenced by applyChoices(), getTotalAbility(), init(), and setAbilities().

◆ _racialFeats

std::vector<uint32> Engines::NWN::CharGenChoices::_racialFeats
private

Definition at line 121 of file chargenchoices.h.

Referenced by applyChoices(), getFeats(), hasFeat(), reset(), and setRace().

◆ _skills

std::vector<uint8> Engines::NWN::CharGenChoices::_skills
private

Definition at line 125 of file chargenchoices.h.

Referenced by applyChoices(), hasPrereqFeat(), resetPackage(), setPackage(), and setSkill().

◆ _soundSet

uint32 Engines::NWN::CharGenChoices::_soundSet
private

Definition at line 128 of file chargenchoices.h.

Referenced by applyChoices(), init(), and setSoundSet().

◆ _spells

std::vector<std::vector<uint16> > Engines::NWN::CharGenChoices::_spells
private

Definition at line 119 of file chargenchoices.h.

Referenced by applyChoices(), resetPackage(), setPackage(), and setSpell().

◆ _spellSchool

uint8 Engines::NWN::CharGenChoices::_spellSchool
private

Definition at line 133 of file chargenchoices.h.

Referenced by applyChoices(), getSpellSchool(), resetPackage(), and setSpellSchool().


The documentation for this class was generated from the following files: