X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FScene.cc;h=45fc3a0ac9bc6f70397206fc49646546c1006614;hp=aa2249c596ae0b462e9910db1bd93362ef8ceabd;hb=e973a129b5b83b628ba3f09e8c95682fc74080cd;hpb=4f9eb9259092994de9690cf12f11437c35a6791e diff --git a/src/Scene.cc b/src/Scene.cc index aa2249c..45fc3a0 100644 --- a/src/Scene.cc +++ b/src/Scene.cc @@ -31,20 +31,20 @@ #include #include #include -#include +#include #include #include #include //#include #include #include +#include #include "Character.hh" #include "Scene.hh" -#include "Tilemap.hh" -struct Scene::Impl : public Mf::Library +struct Scene::Impl : public Mf::Manager { struct Quad : public Mf::Entity { @@ -57,7 +57,7 @@ struct Scene::Impl : public Mf::Library }; Quad(const Mf::Vector3* vertices[4], const std::string& texture, - Tilemap::Index tileIndex) : + Mf::Texture::TileIndex tileIndex) : mTilemap(texture), mBlending(false), mFog(false), @@ -143,7 +143,7 @@ struct Scene::Impl : public Mf::Library Mf::Vector3 mVertices[4]; Mf::Scalar mTexCoords[8]; - Tilemap mTilemap; + Mf::Texture mTilemap; bool mBlending; bool mFog; @@ -170,8 +170,8 @@ struct Scene::Impl : public Mf::Library }; - explicit Impl(const std::string& name) : - Mf::Library(name) {} + void init(const std::string& name) {} + void importSceneBindings(Mf::Script& script) { @@ -372,7 +372,7 @@ struct Scene::Impl : public Mf::Library table.pushField(i); - Tilemap::Index index; + Mf::Texture::TileIndex index; top.get(index); script.pop(); @@ -380,7 +380,7 @@ struct Scene::Impl : public Mf::Library 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], @@ -425,10 +425,10 @@ struct Scene::Impl : public Mf::Library 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()) {