X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FScene.cc;h=dc6ab75cac02f218bebd54d1b173382c64086389;hp=af54c28768cfa92af735ccb9858d211f0a0789b2;hb=574af38ed616d1adfa5e6ce35f67cda1f707f89d;hpb=6c9943707d4f33035830eba0587a61a34eaecbc2 diff --git a/src/Scene.cc b/src/Scene.cc index af54c28..dc6ab75 100644 --- a/src/Scene.cc +++ b/src/Scene.cc @@ -1,13 +1,11 @@ -/*] Copyright (c) 2009-2010, Charles McGarvey [************************** +/*] Copyright (c) 2009-2011, Charles McGarvey [***************************** **] All rights reserved. * -* vi:ts=4 sw=4 tw=75 -* * Distributable under the terms and conditions of the 2-clause BSD license; * see the file COPYING for a complete text of the license. * -**************************************************************************/ +*****************************************************************************/ #include @@ -36,12 +34,12 @@ struct Scene::impl : public moof::manager NONE = 0, LEFT = 1, RIGHT = 2, - TOP = 3 + TOP = 3 }; Quad(const moof::vector3* vertices[4], - const moof::image_handle& texture, - int tileIndex) : + const moof::image_handle& texture, + int tileIndex) : mTilemap(texture, tileIndex), mBlending(false), mFog(false), @@ -112,9 +110,9 @@ struct Scene::impl : public moof::manager moof::sprite mTilemap; - bool mBlending; - bool mFog; - Surface mSurface; + bool mBlending; + bool mFog; + Surface mSurface; }; @@ -123,9 +121,9 @@ struct Scene::impl : public moof::manager moof::image_handle mTexture; std::list< boost::shared_ptr > mObjects; - std::list mLines; + std::list mLines; - moof::aabb<3> mBounds; + moof::aabb<3> mBounds; enum AXIS @@ -264,14 +262,13 @@ struct Scene::impl : public moof::manager int rotate(moof::script& script) { - size_t index = 0; + size_t index = 0; moof::scalar value; script[1].require_number().get(index); script[2].require_number().get(value); - moof::matrix_rotate_about_world_axis(mTransform, index, - moof::rad(value)); + moof::matrix_rotate_about_world_axis(mTransform, index, moof::rad(value)); return 0; } @@ -350,7 +347,7 @@ struct Scene::impl : public moof::manager } } - Quad::Surface surface = Quad::NONE; + Quad::Surface surface = Quad::NONE; table.get(surface, "surface"); if (surface != Quad::NONE) @@ -365,7 +362,6 @@ struct Scene::impl : public moof::manager mLines.push_back(moof::line<2>(bl, tr)); } - return 0; } @@ -374,8 +370,8 @@ struct Scene::impl : public moof::manager moof::script::slot param = script[1]; moof::script::slot top = script[-1]; - int index = 0; - int width = 1; + int index = 0; + int width = 1; bool blending = false; bool fog = false; @@ -479,7 +475,7 @@ void Scene::draw_if_visible(moof::scalar alpha, bool Scene::castRay(const moof::ray<2>& ray, - std::list::contact>& hits) const + std::list::contact>& hits) const { std::list< moof::line<2> >& lines = impl_->mLines; std::list< moof::line<2> >::const_iterator it; @@ -558,4 +554,3 @@ bool Scene::checkForCollision(Character& character) return false; } -