+int YoinkApp::myThread()
+{
+ Mf::Scalar timer = Mf::Timer::getTicks();
+
+ for (;;)
+ {
+ std::cout << "thread awake: " << Mf::Timer::getTicks() << std::endl;
+
+ timer += 3.0;
+ Mf::Timer::sleep(timer, true);
+ }
+ return 0;
+}
+
+
+YoinkApp::YoinkApp(int argc, char* argv[]) :
+ Mf::Engine(argc, argv, configFiles(), PACKAGE_STRING, iconFile()),
+ music("NightFusionIntro"),
+ punchSound("RobotPunch")
+{
+ Mf::dispatcher::addHandler("video.context_recreated",
+ boost::bind(&YoinkApp::contextRecreated, this, _1), this);
+ setupGL();
+
+ music.setLooping(true);
+ music.enqueue("NightFusionLoop");
+ music.stream();
+
+ heroine = Character::alloc("RobotTrooper");
+ heroine->getAnimation().startSequence("Run");
+
+ Mf::Scalar a[6] = {0.0, 1.5, -0.5, 3.0, -1.5, 1.0};
+ interp.init(a, 2.0, Mf::Interpolator::OSCILLATE);
+
+ Mf::Scalar b[2] = {1.0, 0.0};
+ fadeIn.init(b, 1.0);
+
+ octree = Mf::loadScene("Test");
+ heroine->treeNode = octree->insert(heroine);