src/Rope.cc
branchnew_graphics
changeset 417 c503e0c6a740
parent 412 721c60072091
child 427 01e77fe8c040
--- a/src/Rope.cc	Thu Jan 22 00:28:26 2009 +0200
+++ b/src/Rope.cc	Thu Jan 22 01:53:05 2009 +0200
@@ -1,6 +1,9 @@
+
+// XXX: must include Player first, as it contains an instance of Rope
 #include "Player.hh"
 #include "Rope.hh"      
 #include "Engine.hh"
+#include "Error.hh"
 
 #include <math.h>
 #include <stdexcept>
@@ -150,6 +153,7 @@
     this->length = length;
 }
 
+#if GRAPHICS_ENABLED
 void Rope::draw (graphics::Display &display, PixelCoordinate camera) {
     PixelCoordinate player_pos = player.getCoordinate() - camera;
     PixelCoordinate target_pos;
@@ -181,6 +185,7 @@
         ROPE_COLOR_DARK
     );
 }
+#endif
 
 void Rope::tick (TimeMS dt) {
     if (state == ROPE_FLYING) {