+#include "special/sprite_manager.h"
+#include "resources.h"
+#include "sector.h"
+#include "tilemap.h"
+#include "video/drawing_context.h"
+#include "camera.h"
+
+BouncyCoin::BouncyCoin(const Vector& pos)
+ : position(pos)
+{
+ timer.start(.3);
+ sprite = sprite_manager->create("coin");
+ sprite->set_action("still");
+}
+
+BouncyCoin::~BouncyCoin()
+{
+ delete sprite;
+}
+
+void
+BouncyCoin::action(float elapsed_time)
+{
+ position.y += -200 * elapsed_time;
+
+ if(timer.check())
+ remove_me();
+}
+
+void
+BouncyCoin::draw(DrawingContext& context)
+{
+ sprite->draw(context, position, LAYER_OBJECTS);
+}
+
+//---------------------------------------------------------------------------
+
+BrokenBrick::BrokenBrick(Sprite* nsprite,
+ const Vector& pos, const Vector& nmovement)
+ : sprite(new Sprite(*nsprite)), position(pos), movement(nmovement)
+{
+ timer.start(.2);
+}
+
+BrokenBrick::~BrokenBrick()
+{
+ delete sprite;
+}
+
+void
+BrokenBrick::action(float elapsed_time)
+{
+ position += movement * elapsed_time;
+
+ if (timer.check())
+ remove_me();
+}
+
+void
+BrokenBrick::draw(DrawingContext& context)
+{
+ sprite->draw_part(context,
+ Vector(rand() % 16, rand() % 16), Vector(16, 16),
+ position, LAYER_OBJECTS + 1);
+}
+
+//---------------------------------------------------------------------------
+
+FloatingText::FloatingText(const Vector& pos, const std::string& text_)
+ : position(pos), text(text_)
+{
+ timer.start(.1);
+ position.x -= text.size() * 8;
+}
+
+FloatingText::FloatingText(const Vector& pos, int score)
+ : position(pos)
+{
+ timer.start(.1);
+
+ // turn int into a string
+ char str[10];
+ snprintf(str, 10, "%d", score);
+ text = str;
+
+ position.x -= text.size() * 8;
+}
+
+void
+FloatingText::action(float elapsed_time)
+{
+ position.y -= 1.4 * elapsed_time;
+
+ if(timer.check())
+ remove_me();
+}
+
+#define FADING_TIME .350