]> Dogcows Code - chaz/yoink/blobdiff - src/GameLayer.cc
bugfix: resource file searching was broken
[chaz/yoink] / src / GameLayer.cc
index 0be8eb744f9fe1720acbb7ac2d9753bbf431987f..8f2f4ec006d953ae70bfe5083b38385d0eb4abc5 100644 (file)
@@ -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));
 }
 
This page took 0.018582 seconds and 4 git commands to generate.