|
|
|
#ifndef OPENMW_ESM_RACE_H
|
|
|
|
#define OPENMW_ESM_RACE_H
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
#include "components/esm/defs.hpp"
|
|
|
|
#include "spelllist.hpp"
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
namespace ESM
|
|
|
|
{
|
|
|
|
|
|
|
|
class ESMReader;
|
|
|
|
class ESMWriter;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Race definition
|
|
|
|
*/
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
struct Race
|
|
|
|
{
|
|
|
|
constexpr static RecNameInts sRecordId = REC_RACE;
|
|
|
|
|
|
|
|
/// Return a string descriptor for this record type. Currently used for debugging / error logs only.
|
|
|
|
static std::string_view getRecordType() { return "Race"; }
|
|
|
|
|
|
|
|
struct SkillBonus
|
|
|
|
{
|
|
|
|
int mSkill; // SkillEnum
|
|
|
|
int mBonus;
|
|
|
|
};
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
struct MaleFemale
|
|
|
|
{
|
|
|
|
int mMale, mFemale;
|
|
|
|
|
|
|
|
int getValue(bool male) const;
|
|
|
|
};
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
struct MaleFemaleF
|
|
|
|
{
|
|
|
|
float mMale, mFemale;
|
|
|
|
|
|
|
|
float getValue(bool male) const;
|
|
|
|
};
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
enum Flags
|
|
|
|
{
|
|
|
|
Playable = 0x01,
|
|
|
|
Beast = 0x02
|
|
|
|
};
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
struct RADTstruct
|
|
|
|
{
|
|
|
|
// List of skills that get a bonus
|
|
|
|
SkillBonus mBonus[7];
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
// Attribute values for male/female
|
|
|
|
MaleFemale mAttributeValues[8];
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
// The actual eye level height (in game units) is (probably) given
|
|
|
|
// as 'height' times 128. This has not been tested yet.
|
|
|
|
MaleFemaleF mHeight, mWeight;
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
int mFlags; // 0x1 - playable, 0x2 - beast race
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
}; // Size = 140 bytes
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
RADTstruct mData;
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
unsigned int mRecordFlags;
|
|
|
|
std::string mId, mName, mDescription;
|
|
|
|
SpellList mPowers;
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
|
|
|
|
void load(ESMReader& esm, bool& isDeleted);
|
|
|
|
void save(ESMWriter& esm, bool isDeleted = false) const;
|
|
|
|
|
|
|
|
void blank();
|
|
|
|
///< Set record to default state (does not touch the ID/index).
|
|
|
|
};
|
|
|
|
|
Finished ALCH, APPA, BOOK, CLOT, CREC, ENCH, GLOB, INGR, LIGH, MISC, RACE, SKIL, SNDG, SSCR and STAT. Phew!
15 years ago
|
|
|
}
|
|
|
|
#endif
|