X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FGameLayer.cc;h=8f2f4ec006d953ae70bfe5083b38385d0eb4abc5;hp=0be8eb744f9fe1720acbb7ac2d9753bbf431987f;hb=90b2c7fb10b244b781b84965a0d36f1f323ee94d;hpb=8148b51f1bec8f662672d3ca36eea1784991e5cc diff --git a/src/GameLayer.cc b/src/GameLayer.cc index 0be8eb7..8f2f4ec 100644 --- a/src/GameLayer.cc +++ b/src/GameLayer.cc @@ -28,13 +28,13 @@ void GameLayer::loadSceneLoader() mState.script.importStandardLibraries(); importLogFunctions(mState.script); - std::string loaderPath = Scene::getPath("loader"); - if (loaderPath == "") + std::string path("loader"); + if (!Scene::getPath(path)) { throw Mf::Error(Mf::Error::RESOURCE_NOT_FOUND, "loader"); } - Mf::Script::Result status = mState.script.doFile(loaderPath); + Mf::Script::Result status = mState.script.doFile(path); if (status != Mf::Script::SUCCESS) { std::string str; @@ -284,6 +284,8 @@ void GameLayer::setProjection() void GameLayer::setProjection(Mf::Scalar width, Mf::Scalar height) { - mState.camera.setProjection(cml::rad(45.0), width / height, 1.0, 200.0); + mState.camera.setProjection(cml::rad(45.0), + width / height, + SCALAR(1.0), SCALAR(200.0)); }