Background can now render three images: Top, Center and Bottom
[supertux.git] / src / object / coin.cpp
index c48292b..8d969e1 100644 (file)
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //  02111-1307, USA.
-
 #include <config.h>
 
-#include "coin.h"
-#include "resources.h"
-#include "video/drawing_context.h"
-#include "sprite/sprite_manager.h"
-#include "player.h"
-#include "sector.h"
-#include "player_status.h"
-#include "gameobjs.h"
-#include "statistics.h"
-#include "object_factory.h"
+#include "coin.hpp"
+#include "resources.hpp"
+#include "video/drawing_context.hpp"
+#include "sprite/sprite_manager.hpp"
+#include "player.hpp"
+#include "sector.hpp"
+#include "player_status.hpp"
+#include "gameobjs.hpp"
+#include "statistics.hpp"
+#include "object_factory.hpp"
 
 Coin::Coin(const Vector& pos)
 {
   bbox.set_pos(pos);
   bbox.set_size(32, 32);
-  sprite = sprite_manager->create("coin");
+  sprite = sprite_manager->create("images/objects/coin/coin.sprite");
+  set_group(COLGROUP_TOUCHABLE);
 }
 
 Coin::Coin(const lisp::Lisp& reader)
@@ -43,7 +43,8 @@ Coin::Coin(const lisp::Lisp& reader)
   reader.get("x", bbox.p1.x);
   reader.get("y", bbox.p1.y);
   bbox.set_size(32, 32);
-  sprite = sprite_manager->create("coin");
+  sprite = sprite_manager->create("images/objects/coin/coin.sprite");
+  set_group(COLGROUP_TOUCHABLE);
 }
 
 Coin::~Coin()
@@ -52,7 +53,7 @@ Coin::~Coin()
 }
 
 void
-Coin::action(float )
+Coin::update(float )
 {
 }