Mf::Settings::getInstance().get("detail", detail);
script.push(detail); script.set("detail");
- script.push(Quad::LEFT); script.set("LEFT");
- script.push(Quad::RIGHT); script.set("RIGHT");
- script.push(Quad::TOP); script.set("TOP");
-
script.push(X); script.set("X");
script.push(Y); script.set("Y");
script.push(Z); script.set("Z");
+
+ script.push(Quad::LEFT); script.set("LEFT");
+ script.push(Quad::RIGHT); script.set("RIGHT");
+ script.push(Quad::TOP); script.set("TOP");
}
int rotate(Mf::Script& script)
{
- Mf::Script::Value axis = script[1].requireString();
+ Mf::Script::Value axis = script[1].requireNumber();
Mf::Script::Value angle = script[2].requireNumber();
size_t index = 0;
int setTexture(Mf::Script& script)
{
- Mf::Script::Value name = script[1].requireString();
-
- name.get(texture);
-
+ script[1].requireString().get(texture);
return 0;
}
height = nTiles / width;
indices.resize(height);
- // the indices are stored upside-down in the scene file so that they
- // are easier to edit as text, so we'll need to load them last row
- // first
+ // the indices are stored upside-down in the scene file so that they are
+ // easier to edit as text, so we'll need to load them last row first
i = 1;
for (h = height - 1; h >= 0; --h)
Scene::Scene(const std::string& name) :
// pass through
- impl_(Scene::Impl::getInstance(name)) {}
+ mImpl(Scene::Impl::getInstance(name)) {}
void Scene::draw(Mf::Scalar alpha) const
{
- impl_->octree->draw(alpha);
+ mImpl->octree->draw(alpha);
}
void Scene::drawIfVisible(Mf::Scalar alpha, const Mf::Frustum& frustum) const
{
- impl_->octree->drawIfVisible(alpha, frustum);
+ mImpl->octree->drawIfVisible(alpha, frustum);
}
{
std::list< boost::shared_ptr<Impl::Quad> > objects;
//std::list<Mf::Octree<Impl::Quad>::InsertableP> objects;
- impl_->octree->getNearbyObjects(objects, character);
- impl_->maximumBounds.draw();
+ mImpl->octree->getNearbyObjects(objects, character);
+ mImpl->maximumBounds.draw();
Mf::logDebug("nearby objects: %d", objects.size());
return false;