stopped infoblocks from ringing, since they're not telephones anymore - code is only...
[supertux.git] / src / object / anchor_point.cpp
index 10cdcde..1150ec5 100644 (file)
@@ -4,6 +4,7 @@
 #include <sstream>
 #include "anchor_point.hpp"
 #include "math/rect.hpp"
+#include "msg.hpp"
 
 std::string anchor_point_to_string(AnchorPoint point)
 {
@@ -73,9 +74,9 @@ Vector get_anchor_pos(const Rect& rect, AnchorPoint point)
       break;
     default:
 #ifdef DEBUG
-      throw new std::runtime_error("Invalid anchor point found");
+      throw std::runtime_error("Invalid anchor point found");
 #endif
-      printf("Invalid anchor point found");
+      msg_warning("Invalid anchor point found");
       result.x = rect.get_left();
       break;
   }
@@ -92,9 +93,9 @@ Vector get_anchor_pos(const Rect& rect, AnchorPoint point)
       break;
     default:
 #ifdef DEBUG
-      throw new std::runtime_error("Invalid anchor point found");
+      throw std::runtime_error("Invalid anchor point found");
 #endif
-      printf("Invalid anchor point found");
+      msg_warning("Invalid anchor point found");
       result.y = rect.get_top();
       break;
   }
@@ -119,9 +120,9 @@ Vector get_anchor_pos(const Rect& destrect, float width, float height,
       break;
     default:
 #ifdef DEBUG
-      throw new std::runtime_error("Invalid anchor point found");
+      throw std::runtime_error("Invalid anchor point found");
 #endif
-      printf("Invalid anchor point found");
+      msg_warning("Invalid anchor point found");
       result.x = destrect.get_left();
       break;
   }
@@ -138,9 +139,9 @@ Vector get_anchor_pos(const Rect& destrect, float width, float height,
       break;
     default:
 #ifdef DEBUG
-      throw new std::runtime_error("Invalid anchor point found");
+      throw std::runtime_error("Invalid anchor point found");
 #endif
-      printf("Invalid anchor point found");
+      msg_warning("Invalid anchor point found");
       result.y = destrect.get_top();
       break;
   }