#include <Moof/Aabb.hh>
#include <Moof/Camera.hh>
#include <Moof/Entity.hh>
-#include <Moof/Exception.hh>
-#include <Moof/Library.hh>
+#include <Moof/Manager.hh>
#include <Moof/Line.hh>
#include <Moof/Log.hh>
#include <Moof/Math.hh>
//#include <Moof/Octree.hh>
#include <Moof/Script.hh>
#include <Moof/Settings.hh>
+#include <Moof/Texture.hh>
#include "Character.hh"
#include "Scene.hh"
-#include "Tilemap.hh"
-struct Scene::Impl : public Mf::Library<Impl>
+struct Scene::Impl : public Mf::Manager<Impl>
{
struct Quad : public Mf::Entity
{
};
Quad(const Mf::Vector3* vertices[4], const std::string& texture,
- Tilemap::Index tileIndex) :
+ Mf::Texture::TileIndex tileIndex) :
mTilemap(texture),
mBlending(false),
mFog(false),
Mf::Vector3 mVertices[4];
Mf::Scalar mTexCoords[8];
- Tilemap mTilemap;
+ Mf::Texture mTilemap;
bool mBlending;
bool mFog;
};
- explicit Impl(const std::string& name) :
- Mf::Library<Impl>(name) {}
+ void init(const std::string& name) {}
+
void importSceneBindings(Mf::Script& script)
{
boost::bind(&Impl::drawTile, this, _1));
int detail = 3;
- Mf::Settings::getInstance().get("detail", detail);
+ Mf::settings.get("detail", detail);
script.push(detail); script.set("detail");
script.push(1); script.set("LOW");
table.pushField(i);
- Tilemap::Index index;
+ Mf::Texture::TileIndex index;
top.get(index);
script.pop();
vertices[h][wPlus1] = Mf::demote(mTransform *
Mf::Vector4(wPlus1, h, 0.0, 1.0));
- if (index == Tilemap::NO_TILE) continue;
+ if (index == Mf::Texture::NO_TILE) continue;
const Mf::Vector3* corners[4] = {
&vertices[h][w],
Mf::Script::Slot param = script[1];
Mf::Script::Slot top = script[-1];
- Tilemap::Index index = 0;
- int width = 1;
- bool blending = false;
- bool fog = false;
+ Mf::Texture::TileIndex index = 0;
+ int width = 1;
+ bool blending = false;
+ bool fog = false;
if (param.isTable())
{