X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FScene.cc;h=bad59bfd79c0c0103e117324f895f003720ceb66;hp=cffd382b1a7aaa62a0e1da42e592b6fea83421bf;hb=a31d65a998121df0651c57bfb68782e2a07d2e2f;hpb=64bd443538f57ad1bdff6c6b35953e72141129b2 diff --git a/src/Scene.cc b/src/Scene.cc index cffd382..bad59bf 100644 --- a/src/Scene.cc +++ b/src/Scene.cc @@ -324,13 +324,13 @@ struct Scene::Impl : public Mf::Mippleton 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"); } @@ -447,7 +447,7 @@ struct Scene::Impl : public Mf::Mippleton 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; @@ -463,10 +463,7 @@ struct Scene::Impl : public Mf::Mippleton int setTexture(Mf::Script& script) { - Mf::Script::Value name = script[1].requireString(); - - name.get(texture); - + script[1].requireString().get(texture); return 0; } @@ -500,9 +497,8 @@ struct Scene::Impl : public Mf::Mippleton 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) @@ -628,17 +624,17 @@ struct Scene::Impl : public Mf::Mippleton 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); } @@ -646,8 +642,8 @@ bool Scene::checkForCollision(Character& character) { std::list< boost::shared_ptr > objects; //std::list::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;