]> Dogcows Code - chaz/yoink/blobdiff - src/YoinkApp.cc
considerable refactoring
[chaz/yoink] / src / YoinkApp.cc
index a17bf88b1c0ffe84c7ef52a2b966773e434f5ea7..7ec807bdb22de89f4c3a7d461e12b38063afec8d 100644 (file)
@@ -119,7 +119,7 @@ YoinkApp::YoinkApp(int argc, char* argv[]) :
 
        state = 0.0;
 
 
        state = 0.0;
 
-       heroine = CharacterPtr(new Character("RobotTrooper"));
+       heroine = Character::alloc("RobotTrooper");
        heroine->getAnimation().startSequence("Run");
 
        font = new TilemapFont;
        heroine->getAnimation().startSequence("Run");
 
        font = new TilemapFont;
@@ -242,6 +242,7 @@ void YoinkApp::draw(Mf::Scalar alpha)
 
 
        //heroine->draw(alpha);
 
 
        //heroine->draw(alpha);
+       heroine->getAabb().draw();
 
 
        hud.draw();
 
 
        hud.draw();
@@ -469,31 +470,16 @@ int main(int argc, char* argv[])
 
        int status = 0;
 
 
        int status = 0;
 
-//start:
        try
        {
                YoinkApp app(argc, argv);
                status = app.run();
        }
        try
        {
                YoinkApp app(argc, argv);
                status = app.run();
        }
-       //catch (Mf::Texture::Exception e)
-       //{
-               //std::cout << "Unhandled exception: " << e.what() << std::endl;
-               //status = 1;
-       //}
        catch (Mf::Exception e)
        {
        catch (Mf::Exception e)
        {
-               //std::cout << "Unhandled exception: " << e.what() << std::endl;
                Mf::logError("unhandled exception: <<%s>>", e.what());
                Mf::logError("unhandled exception: <<%s>>", e.what());
-               Mf::logInfo("it's time to crash now ;-(");
+               Mf::logInfo("it's time to crash now :-(");
                status = 1;
                status = 1;
-
-               //std::cout << "Yoink stopped.  Do you want to run it again? [yes/No]"
-                       //<< std::endl;
-
-               //char answer;
-               //std::cin >> answer;
-
-               //if (answer == 'y' || answer == 'Y') goto start;
        }
 
        std::cout << std::endl << "Goodbye..." << std::endl << std::endl;
        }
 
        std::cout << std::endl << "Goodbye..." << std::endl << std::endl;
This page took 0.018576 seconds and 4 git commands to generate.