mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 09:35:28 +00:00
Some changes
This commit is contained in:
parent
a74aeace73
commit
0c9dfcc017
@ -41,6 +41,8 @@ struct Arguments
|
|||||||
string outname;
|
string outname;
|
||||||
|
|
||||||
ESMData data;
|
ESMData data;
|
||||||
|
ESMReader reader;
|
||||||
|
ESMWriter writer;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool parseOptions (int argc, char** argv, Arguments &info)
|
bool parseOptions (int argc, char** argv, Arguments &info)
|
||||||
@ -230,7 +232,7 @@ void printRaw(ESMReader &esm)
|
|||||||
|
|
||||||
int load(Arguments& info)
|
int load(Arguments& info)
|
||||||
{
|
{
|
||||||
ESMReader esm;
|
ESMReader& esm = info.reader;
|
||||||
esm.setEncoding(info.encoding);
|
esm.setEncoding(info.encoding);
|
||||||
|
|
||||||
string filename = info.filename;
|
string filename = info.filename;
|
||||||
@ -806,7 +808,7 @@ int clone(Arguments& info)
|
|||||||
|
|
||||||
cout << endl << "Saving records to: " << info.outname << "..." << endl;
|
cout << endl << "Saving records to: " << info.outname << "..." << endl;
|
||||||
|
|
||||||
ESMWriter esm;
|
ESMWriter& esm = info.writer;
|
||||||
esm.setEncoding(info.encoding);
|
esm.setEncoding(info.encoding);
|
||||||
esm.setAuthor(info.data.author);
|
esm.setAuthor(info.data.author);
|
||||||
esm.setDescription(info.data.description);
|
esm.setDescription(info.data.description);
|
||||||
|
@ -91,13 +91,17 @@ void Land::save(ESMWriter &esm)
|
|||||||
|
|
||||||
esm.writeHNT("DATA", flags);
|
esm.writeHNT("DATA", flags);
|
||||||
|
|
||||||
/* TODO: Land!
|
// TODO: Land!
|
||||||
if (hasData && !dataLoaded)
|
bool wasLoaded = dataLoaded;
|
||||||
|
if (hasData)
|
||||||
loadData(); // I think it might be a good idea to have
|
loadData(); // I think it might be a good idea to have
|
||||||
// the data loaded before trying to save it
|
// the data loaded before trying to save it
|
||||||
*/
|
|
||||||
if (dataLoaded)
|
if (dataLoaded)
|
||||||
landData->save(esm);
|
landData->save(esm);
|
||||||
|
|
||||||
|
if (!wasLoaded)
|
||||||
|
unloadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Land::loadData()
|
void Land::loadData()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user