mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-20 03:53:52 +00:00
removed unused file type information from esm component
This commit is contained in:
parent
a0df25c631
commit
64d517dd79
6 changed files with 6 additions and 49 deletions
|
@ -23,7 +23,6 @@ struct ESMData
|
||||||
std::string author;
|
std::string author;
|
||||||
std::string description;
|
std::string description;
|
||||||
int version;
|
int version;
|
||||||
int type;
|
|
||||||
ESM::ESMReader::MasterList masters;
|
ESM::ESMReader::MasterList masters;
|
||||||
|
|
||||||
std::deque<EsmTool::RecordBase *> mRecords;
|
std::deque<EsmTool::RecordBase *> mRecords;
|
||||||
|
@ -284,8 +283,6 @@ int load(Arguments& info)
|
||||||
info.data.author = esm.getAuthor();
|
info.data.author = esm.getAuthor();
|
||||||
info.data.description = esm.getDesc();
|
info.data.description = esm.getDesc();
|
||||||
info.data.masters = esm.getMasters();
|
info.data.masters = esm.getMasters();
|
||||||
info.data.version = esm.getVer();
|
|
||||||
info.data.type = esm.getType();
|
|
||||||
|
|
||||||
if (!quiet)
|
if (!quiet)
|
||||||
{
|
{
|
||||||
|
@ -430,7 +427,6 @@ int clone(Arguments& info)
|
||||||
esm.setAuthor(info.data.author);
|
esm.setAuthor(info.data.author);
|
||||||
esm.setDescription(info.data.description);
|
esm.setDescription(info.data.description);
|
||||||
esm.setVersion(info.data.version);
|
esm.setVersion(info.data.version);
|
||||||
esm.setType(info.data.type);
|
|
||||||
|
|
||||||
for (ESM::ESMReader::MasterList::iterator it = info.data.masters.begin(); it != info.data.masters.end(); ++it)
|
for (ESM::ESMReader::MasterList::iterator it = info.data.masters.begin(); it != info.data.masters.end(); ++it)
|
||||||
esm.addMaster(it->name, it->size);
|
esm.addMaster(it->name, it->size);
|
||||||
|
|
|
@ -78,7 +78,7 @@ struct HEDRstruct
|
||||||
1.2 = 0x3f99999a and 1.3 = 0x3fa66666
|
1.2 = 0x3f99999a and 1.3 = 0x3fa66666
|
||||||
*/
|
*/
|
||||||
int version;
|
int version;
|
||||||
int type; // 0=esp, 1=esm, 32=ess
|
int type; // 0=esp, 1=esm, 32=ess (unused)
|
||||||
NAME32 author; // Author's name
|
NAME32 author; // Author's name
|
||||||
NAME256 desc; // File description
|
NAME256 desc; // File description
|
||||||
int records; // Number of records? Not used.
|
int records; // Number of records? Not used.
|
||||||
|
|
|
@ -86,30 +86,6 @@ void ESMReader::open(Ogre::DataStreamPtr _esm, const std::string &name)
|
||||||
m.size = getHNLong("DATA");
|
m.size = getHNLong("DATA");
|
||||||
mMasters.push_back(m);
|
mMasters.push_back(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mCtx.header.type == FT_ESS)
|
|
||||||
{
|
|
||||||
// Savegame-related data
|
|
||||||
|
|
||||||
// Player position etc
|
|
||||||
getHNT(mSaveData, "GMDT", 124);
|
|
||||||
|
|
||||||
/* Image properties, five ints. Is always:
|
|
||||||
Red-mask: 0xff0000
|
|
||||||
Blue-mask: 0x00ff00
|
|
||||||
Green-mask: 0x0000ff
|
|
||||||
Alpha-mask: 0x000000
|
|
||||||
Bpp: 32
|
|
||||||
*/
|
|
||||||
getSubNameIs("SCRD");
|
|
||||||
skipHSubSize(20);
|
|
||||||
|
|
||||||
/* Savegame screenshot:
|
|
||||||
128x128 pixels * 4 bytes per pixel
|
|
||||||
*/
|
|
||||||
getSubNameIs("SCRS");
|
|
||||||
skipHSubSize(65536);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ESMReader::open(const std::string &file)
|
void ESMReader::open(const std::string &file)
|
||||||
|
|
|
@ -39,10 +39,8 @@ public:
|
||||||
int getVer() const { return mCtx.header.version; }
|
int getVer() const { return mCtx.header.version; }
|
||||||
float getFVer() const { if(mCtx.header.version == VER_12) return 1.2; else return 1.3; }
|
float getFVer() const { if(mCtx.header.version == VER_12) return 1.2; else return 1.3; }
|
||||||
int getSpecial() const { return mSpf; }
|
int getSpecial() const { return mSpf; }
|
||||||
int getType() const { return mCtx.header.type; }
|
|
||||||
const std::string getAuthor() const { return mCtx.header.author.toString(); }
|
const std::string getAuthor() const { return mCtx.header.author.toString(); }
|
||||||
const std::string getDesc() const { return mCtx.header.desc.toString(); }
|
const std::string getDesc() const { return mCtx.header.desc.toString(); }
|
||||||
const SaveData &getSaveData() const { return mSaveData; }
|
|
||||||
const MasterList &getMasters() const { return mMasters; }
|
const MasterList &getMasters() const { return mMasters; }
|
||||||
const NAME &retSubName() const { return mCtx.subName; }
|
const NAME &retSubName() const { return mCtx.subName; }
|
||||||
uint32_t getSubSize() const { return mCtx.leftSub; }
|
uint32_t getSubSize() const { return mCtx.leftSub; }
|
||||||
|
@ -268,7 +266,6 @@ private:
|
||||||
// Buffer for ESM strings
|
// Buffer for ESM strings
|
||||||
std::vector<char> mBuffer;
|
std::vector<char> mBuffer;
|
||||||
|
|
||||||
SaveData mSaveData;
|
|
||||||
MasterList mMasters;
|
MasterList mMasters;
|
||||||
std::vector<ESMReader> *mGlobalReaderList;
|
std::vector<ESMReader> *mGlobalReaderList;
|
||||||
ToUTF8::Utf8Encoder* mEncoder;
|
ToUTF8::Utf8Encoder* mEncoder;
|
||||||
|
|
|
@ -17,16 +17,6 @@ void ESMWriter::setVersion(int ver)
|
||||||
m_header.version = ver;
|
m_header.version = ver;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ESMWriter::getType()
|
|
||||||
{
|
|
||||||
return m_header.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ESMWriter::setType(int type)
|
|
||||||
{
|
|
||||||
m_header.type = type;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ESMWriter::setAuthor(const std::string& auth)
|
void ESMWriter::setAuthor(const std::string& auth)
|
||||||
{
|
{
|
||||||
strncpy((char*)&m_header.author, auth.c_str(), 32);
|
strncpy((char*)&m_header.author, auth.c_str(), 32);
|
||||||
|
|
|
@ -22,8 +22,6 @@ class ESMWriter
|
||||||
public:
|
public:
|
||||||
int getVersion();
|
int getVersion();
|
||||||
void setVersion(int ver);
|
void setVersion(int ver);
|
||||||
int getType();
|
|
||||||
void setType(int type);
|
|
||||||
void setEncoder(ToUTF8::Utf8Encoder *encoding); // Write strings as UTF-8?
|
void setEncoder(ToUTF8::Utf8Encoder *encoding); // Write strings as UTF-8?
|
||||||
void setAuthor(const std::string& author);
|
void setAuthor(const std::string& author);
|
||||||
void setDescription(const std::string& desc);
|
void setDescription(const std::string& desc);
|
||||||
|
|
Loading…
Reference in a new issue