#include <boost/bind.hpp>
+#include <Moof/Exception.hh>
+#include <Moof/Log.hh>
#include <Moof/Math.hh>
#include <Moof/OpenGL.hh>
#include <Moof/Settings.hh>
state = 0.0;
- heroine = CharacterPtr(new Character("RobotTrooper"));
+ heroine = Character::alloc("RobotTrooper");
heroine->getAnimation().startSequence("Run");
font = new TilemapFont;
YoinkApp::~YoinkApp()
{
- std::cerr << "yoinkapp destructor" << std::endl;
//delete heroine;
delete font;
delete testScene;
//heroine->draw(alpha);
+ heroine->getAabb().draw();
hud.draw();
int main(int argc, char* argv[])
{
- std::cout << PACKAGE_STRING << std::endl
+ std::cout << std::endl << PACKAGE_STRING << std::endl
<< "Compiled " << __TIME__ " " __DATE__ << std::endl
<< "Send patches and bug reports to <"
PACKAGE_BUGREPORT << ">." << std::endl << std::endl;
+#if ! NDEBUG
+ Mf::setLogLevel(Mf::DEBUGGING);
+#endif
+
int status = 0;
try
{
- YoinkApp* app = new YoinkApp(argc, argv);
- status = app->run();
- delete app;
+ YoinkApp app(argc, argv);
+ status = app.run();
}
- catch (Mf::Engine::Exception e)
+ catch (Mf::Exception e)
{
- std::cerr << "Unhandled exception: " << e.what() << std::endl;
+ Mf::logError("unhandled exception: <<%s>>", e.what());
+ Mf::logInfo("it's time to crash now :-(");
status = 1;
}
- std::cout << "Goodbye..." << std::endl;
+ std::cout << std::endl << "Goodbye..." << std::endl << std::endl;
return status;
}