*******************************************************************************/
-#include <Moof/Mippleton.hh>
+#include <Moof/Library.hh>
#include <Moof/OpenGL.hh>
#include <Moof/Script.hh>
#include "Tilemap.hh"
-struct Tilemap::Impl : public Mf::Mippleton<Impl>
+struct Tilemap::Impl : public Mf::Library<Impl>
{
Impl(const std::string& name) :
- Mf::Mippleton<Impl>(name),
+ Mf::Library<Impl>(name),
mMagFilter(GL_NEAREST),
mMinFilter(GL_NEAREST),
mTilesS(1),
std::string filePath = Tilemap::getPath(getName());
script.importStandardLibraries();
- importLogScript(script);
+ importLogFunctions(script);
bindScriptConstants(script);
if (script.doFile(filePath) != Mf::Script::SUCCESS)
{
std::string str;
script[-1].get(str);
- Mf::logScript("%s", str.c_str());
+ Mf::logWarning(str);
return; // TODO needs a better exit strategy
}
- Mf::logInfo("loading tiles from tilemap %s", filePath.c_str());
+ Mf::logInfo << "loading tiles from tilemap " << filePath << std::endl;
- Mf::Script::Value globals = script.getGlobalTable();
- Mf::Script::Value top = script[-1];
+ Mf::Script::Slot globals = script.getGlobalTable();
+ Mf::Script::Slot top = script[-1];
globals.pushField("tiles_s");
top.get(mTilesS);