#include "irr_v3d.h"
#include "util/areastore.h"
#include "filesys.h"
-#ifndef ANDROID
- #include "cmake_config.h"
-#endif
#include <fstream>
static inline void get_data_and_border_flags(lua_State *L, u8 start_i,
LuaAreaStore::LuaAreaStore()
{
-#if USE_SPATIAL
- this->as = new SpatialAreaStore();
-#else
- this->as = new VectorAreaStore();
-#endif
+ this->as = AreaStore::getOptimalImplementation();
}
LuaAreaStore::LuaAreaStore(const std::string &type)
AST_OVERLAPS_IN_DIMENSION((amine), (amaxe), (b), Y) && \
AST_OVERLAPS_IN_DIMENSION((amine), (amaxe), (b), Z))
+
+AreaStore *AreaStore::getOptimalImplementation()
+{
+#if USE_SPATIAL
+ return new SpatialAreaStore();
+#else
+ return new VectorAreaStore();
+#endif
+}
+
u16 AreaStore::size() const
{
return areas_map.size();
std::string data;
};
-std::vector<std::string> get_areastore_typenames();
class AreaStore {
protected:
const Area *getArea(u32 id) const;
u16 size() const;
+
+ static AreaStore *getOptimalImplementation();
#if 0
bool deserialize(std::istream &is);
void serialize(std::ostream &is) const;