mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-05-02 14:57:59 +03:00
cleaned up race record struct
This commit is contained in:
parent
62d70f17c8
commit
18e046e628
4 changed files with 34 additions and 64 deletions
|
@ -5,6 +5,15 @@
|
|||
|
||||
namespace ESM
|
||||
{
|
||||
int Race::MaleFemale::getValue (bool male) const
|
||||
{
|
||||
return male ? mMale : mFemale;
|
||||
}
|
||||
|
||||
int Race::MaleFemaleF::getValue (bool male) const
|
||||
{
|
||||
return male ? mMale : mFemale;
|
||||
}
|
||||
|
||||
void Race::load(ESMReader &esm)
|
||||
{
|
||||
|
|
|
@ -26,11 +26,15 @@ struct Race
|
|||
struct MaleFemale
|
||||
{
|
||||
int mMale, mFemale;
|
||||
|
||||
int getValue (bool male) const;
|
||||
};
|
||||
|
||||
struct MaleFemaleF
|
||||
{
|
||||
float mMale, mFemale;
|
||||
|
||||
int getValue (bool male) const;
|
||||
};
|
||||
|
||||
enum Flags
|
||||
|
@ -45,14 +49,7 @@ struct Race
|
|||
SkillBonus mBonus[7];
|
||||
|
||||
// Attribute values for male/female
|
||||
MaleFemale mStrength,
|
||||
mIntelligence,
|
||||
mWillpower,
|
||||
mAgility,
|
||||
mSpeed,
|
||||
mEndurance,
|
||||
mPersonality,
|
||||
mLuck;
|
||||
MaleFemale mAttributeValues[8];
|
||||
|
||||
// The actual eye level height (in game units) is (probably) given
|
||||
// as 'height' times 128. This has not been tested yet.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue