1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-09 12:42:11 +00:00
OpenMW/apps/openmw/mwworld/cells.hpp
Mark Siewert 8ea9f00e6f Merge remote-tracking branch 'upstream/master' into multiple_esm_esp
Conflicts:
	apps/openmw/mwrender/terrain.cpp
	apps/openmw/mwworld/cells.cpp
	apps/openmw/mwworld/cells.hpp
	apps/openmw/mwworld/cellstore.cpp
	apps/openmw/mwworld/cellstore.hpp
	apps/openmw/mwworld/containerstore.cpp
	apps/openmw/mwworld/localscripts.cpp
	apps/openmw/mwworld/scene.cpp
	apps/openmw/mwworld/worldimp.cpp
	apps/openmw/mwworld/worldimp.hpp
	components/esm_store/reclists.hpp
	components/esm_store/store.cpp
	extern/shiny

- Re-implement some patches that were broken by the removal of reclists.hpp and store.cpp/.hpp.
- NOTE: Not everything works as before, I'll have to test some more stuff before we are back to where we were.
2012-11-25 14:12:44 +01:00

55 lines
1.3 KiB
C++

#ifndef GAME_MWWORLD_CELLS_H
#define GAME_MWWORLD_CELLS_H
#include <map>
#include <list>
#include <string>
#include "ptr.hpp"
namespace ESM
{
class ESMReader;
}
namespace MWWorld
{
class ESMStore;
/// \brief Cell container
class Cells
{
const MWWorld::ESMStore& mStore;
std::vector<ESM::ESMReader>& mReader;
std::map<std::string, CellStore> mInteriors;
std::map<std::pair<int, int>, CellStore> mExteriors;
std::vector<std::pair<std::string, CellStore *> > mIdCache;
std::size_t mIdCacheIndex;
Cells (const Cells&);
Cells& operator= (const Cells&);
CellStore *getCellStore (const ESM::Cell *cell);
void fillContainers (CellStore& cellStore);
Ptr getPtrAndCache (const std::string& name, CellStore& cellStore);
public:
Cells (const MWWorld::ESMStore& store, std::vector<ESM::ESMReader>& reader);
///< \todo pass the dynamic part of the ESMStore isntead (once it is written) of the whole
/// world
CellStore *getExterior (int x, int y);
CellStore *getInterior (const std::string& name);
Ptr getPtr (const std::string& name, CellStore& cellStore);
Ptr getPtr (const std::string& name);
};
}
#endif