forked from teamnwah/openmw-tes3coop
ESSImport: container state
parent
a7b82e5107
commit
8e1eeccbe1
@ -0,0 +1,13 @@
|
||||
#include "convertcntc.hpp"
|
||||
|
||||
#include "convertinventory.hpp"
|
||||
|
||||
namespace ESSImport
|
||||
{
|
||||
|
||||
void convertCNTC(const CNTC &cntc, ESM::ContainerState &state)
|
||||
{
|
||||
convertInventory(cntc.mInventory, state.mInventory);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
#ifndef OPENMW_ESSIMPORT_CONVERTCNTC_H
|
||||
#define OPENMW_ESSIMPORT_CONVERTCNTC_H
|
||||
|
||||
#include "importcntc.hpp"
|
||||
|
||||
#include <components/esm/containerstate.hpp>
|
||||
|
||||
namespace ESSImport
|
||||
{
|
||||
|
||||
void convertCNTC(const CNTC& cntc, ESM::ContainerState& state);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,16 @@
|
||||
#include "importcntc.hpp"
|
||||
|
||||
#include <components/esm/esmreader.hpp>
|
||||
|
||||
namespace ESSImport
|
||||
{
|
||||
|
||||
void CNTC::load(ESM::ESMReader &esm)
|
||||
{
|
||||
mIndex = 0;
|
||||
esm.getHNT(mIndex, "INDX");
|
||||
|
||||
mInventory.load(esm);
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
#ifndef OPENMW_ESSIMPORT_IMPORTCNTC_H
|
||||
#define OPENMW_ESSIMPORT_IMPORTCNTC_H
|
||||
|
||||
#include "importinventory.hpp"
|
||||
|
||||
namespace ESM
|
||||
{
|
||||
class ESMReader;
|
||||
}
|
||||
|
||||
namespace ESSImport
|
||||
{
|
||||
|
||||
/// Changed container contents
|
||||
struct CNTC
|
||||
{
|
||||
int mIndex;
|
||||
|
||||
Inventory mInventory;
|
||||
|
||||
void load(ESM::ESMReader& esm);
|
||||
};
|
||||
|
||||
}
|
||||
#endif
|
@ -1,49 +0,0 @@
|
||||
#ifndef OPENMW_ESM_CREC_H
|
||||
#define OPENMW_ESM_CREC_H
|
||||
|
||||
#include <string>
|
||||
|
||||
// TODO create implementation files and remove this one
|
||||
#include "esmreader.hpp"
|
||||
|
||||
namespace ESM {
|
||||
|
||||
class ESMReader;
|
||||
class ESMWriter;
|
||||
|
||||
/* These two are only used in save games. They are not decoded yet.
|
||||
*/
|
||||
|
||||
/// Changes a creature
|
||||
struct LoadCREC
|
||||
{
|
||||
static unsigned int sRecordId;
|
||||
|
||||
std::string mId;
|
||||
|
||||
void load(ESMReader &esm)
|
||||
{
|
||||
esm.skipRecord();
|
||||
}
|
||||
|
||||
void save(ESMWriter &esm) const
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
/// Changes an item list / container
|
||||
struct LoadCNTC
|
||||
{
|
||||
std::string mId;
|
||||
|
||||
void load(ESMReader &esm)
|
||||
{
|
||||
esm.skipRecord();
|
||||
}
|
||||
|
||||
void save(ESMWriter &esm) const
|
||||
{
|
||||
}
|
||||
};
|
||||
}
|
||||
#endif
|
Loading…
Reference in New Issue