mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-02-19 16:39:41 +00:00
- Minor code cleanup
This commit is contained in:
parent
a8e02779b2
commit
713d324eeb
6 changed files with 12 additions and 10 deletions
|
@ -143,7 +143,7 @@ namespace MWRender
|
|||
std::map<uint16_t, int> indexes;
|
||||
initTerrainTextures(&terrainData, cellX, cellY,
|
||||
x * numTextures, y * numTextures,
|
||||
numTextures, indexes, land->plugin);
|
||||
numTextures, indexes, land->mPlugin);
|
||||
|
||||
if (mTerrainGroup.getTerrain(terrainX, terrainY) == NULL)
|
||||
{
|
||||
|
|
|
@ -98,7 +98,10 @@ namespace MWWorld
|
|||
/// A list of container references. These references do not track their mRefnumber.
|
||||
/// Otherwise, taking 1 of 20 instances of an object would produce multiple objects
|
||||
/// with the same reference.
|
||||
// TODO: Check how Morrowind does this! Maybe auto-generate references on drop.
|
||||
/// Unfortunately, this also means that we need a different STL container.
|
||||
/// (cells use CellRefList, where refs can be located according to their refnumner,
|
||||
/// which uses a map; container items do not make use of the refnumber, so we
|
||||
/// can't use a map with refnumber keys.)
|
||||
template <typename X>
|
||||
struct ContainerRefList
|
||||
{
|
||||
|
|
|
@ -28,8 +28,8 @@ void ESMStore::load(ESM::ESMReader &esm)
|
|||
ESM::Dialogue *dialogue = 0;
|
||||
|
||||
// Cache parent esX files by tracking their indices in the global list of
|
||||
// all files/readers used by the engine. This will greaty help to accelerate
|
||||
// parsing of reference IDs.
|
||||
// all files/readers used by the engine. This will greaty accelerate
|
||||
// refnumber mangling, as required for handling moved references.
|
||||
int index = ~0;
|
||||
const ESM::ESMReader::MasterList &masters = esm.getMasters();
|
||||
std::vector<ESM::ESMReader> *allPlugins = esm.getGlobalReaderList();
|
||||
|
@ -122,7 +122,6 @@ void ESMStore::load(ESM::ESMReader &esm)
|
|||
cout << *it << " ";
|
||||
cout << endl;
|
||||
*/
|
||||
//setUp();
|
||||
}
|
||||
|
||||
void ESMStore::setUp()
|
||||
|
|
|
@ -80,9 +80,9 @@ public:
|
|||
// terrain palette, but ESMReader does not pass a reference to the correct plugin
|
||||
// to the individual load() methods. This hack allows to pass this reference
|
||||
// indirectly to the load() method.
|
||||
int idx;
|
||||
void setIndex(const int index) {idx = index; mCtx.index = index;}
|
||||
const int getIndex() {return idx;}
|
||||
int mIdx;
|
||||
void setIndex(const int index) {mIdx = index; mCtx.index = index;}
|
||||
const int getIndex() {return mIdx;}
|
||||
|
||||
void setGlobalReaderList(std::vector<ESMReader> *list) {mGlobalReaderList = list;}
|
||||
std::vector<ESMReader> *getGlobalReaderList() {return mGlobalReaderList;}
|
||||
|
|
|
@ -81,7 +81,7 @@ Land::~Land()
|
|||
void Land::load(ESMReader &esm)
|
||||
{
|
||||
mEsm = &esm;
|
||||
plugin = mEsm->getIndex();
|
||||
mPlugin = mEsm->getIndex();
|
||||
|
||||
// Get the grid location
|
||||
esm.getSubNameIs("INTV");
|
||||
|
|
|
@ -23,7 +23,7 @@ struct Land
|
|||
int mFlags; // Only first four bits seem to be used, don't know what
|
||||
// they mean.
|
||||
int mX, mY; // Map coordinates.
|
||||
int plugin; // Plugin index, used to reference the correct material palette.
|
||||
int mPlugin; // Plugin index, used to reference the correct material palette.
|
||||
|
||||
// File context. This allows the ESM reader to be 'reset' to this
|
||||
// location later when we are ready to load the full data set.
|
||||
|
|
Loading…
Reference in a new issue