mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 05:47:57 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
75
components/esm/loadrace.hpp
Normal file
75
components/esm/loadrace.hpp
Normal file
|
@ -0,0 +1,75 @@
|
|||
#ifndef OPENMW_ESM_RACE_H
|
||||
#define OPENMW_ESM_RACE_H
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "spelllist.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/*
|
||||
* Race definition
|
||||
*/
|
||||
|
||||
struct Race
|
||||
{
|
||||
struct SkillBonus
|
||||
{
|
||||
int mSkill; // SkillEnum
|
||||
int mBonus;
|
||||
};
|
||||
|
||||
struct MaleFemale
|
||||
{
|
||||
int mMale, mFemale;
|
||||
|
||||
int getValue (bool male) const;
|
||||
};
|
||||
|
||||
struct MaleFemaleF
|
||||
{
|
||||
float mMale, mFemale;
|
||||
|
||||
int getValue (bool male) const;
|
||||
};
|
||||
|
||||
enum Flags
|
||||
{
|
||||
Playable = 0x01,
|
||||
Beast = 0x02
|
||||
};
|
||||
|
||||
struct RADTstruct
|
||||
{
|
||||
// List of skills that get a bonus
|
||||
SkillBonus mBonus[7];
|
||||
|
||||
// Attribute values for male/female
|
||||
MaleFemale mAttributeValues[8];
|
||||
|
||||
// The actual eye level height (in game units) is (probably) given
|
||||
// as 'height' times 128. This has not been tested yet.
|
||||
MaleFemaleF mHeight, mWeight;
|
||||
|
||||
int mFlags; // 0x1 - playable, 0x2 - beast race
|
||||
|
||||
}; // Size = 140 bytes
|
||||
|
||||
RADTstruct mData;
|
||||
|
||||
std::string mId, mName, mDescription;
|
||||
SpellList mPowers;
|
||||
|
||||
void load(ESMReader &esm);
|
||||
void save(ESMWriter &esm);
|
||||
|
||||
void blank();
|
||||
///< Set record to default state (does not touch the ID/index).
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue