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
43
components/esm/loadligh.cpp
Normal file
43
components/esm/loadligh.cpp
Normal file
|
@ -0,0 +1,43 @@
|
|||
#include "loadligh.hpp"
|
||||
|
||||
#include "esmreader.hpp"
|
||||
#include "esmwriter.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
|
||||
void Light::load(ESMReader &esm)
|
||||
{
|
||||
mModel = esm.getHNString("MODL");
|
||||
mName = esm.getHNOString("FNAM");
|
||||
mIcon = esm.getHNOString("ITEX");
|
||||
assert(sizeof(mData) == 24);
|
||||
esm.getHNT(mData, "LHDT", 24);
|
||||
mScript = esm.getHNOString("SCRI");
|
||||
mSound = esm.getHNOString("SNAM");
|
||||
}
|
||||
void Light::save(ESMWriter &esm)
|
||||
{
|
||||
esm.writeHNCString("MODL", mModel);
|
||||
esm.writeHNOCString("FNAM", mName);
|
||||
esm.writeHNOCString("ITEX", mIcon);
|
||||
esm.writeHNT("LHDT", mData, 24);
|
||||
esm.writeHNOCString("SCRI", mScript);
|
||||
esm.writeHNOCString("SNAM", mSound);
|
||||
}
|
||||
|
||||
void Light::blank()
|
||||
{
|
||||
mData.mWeight = 0;
|
||||
mData.mValue = 0;
|
||||
mData.mTime = 0;
|
||||
mData.mRadius = 0;
|
||||
mData.mColor = 0;
|
||||
mData.mFlags = 0;
|
||||
mSound.clear();
|
||||
mScript.clear();
|
||||
mModel.clear();
|
||||
mIcon.clear();
|
||||
mName.clear();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue