projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Matt's patch for Stalactite shaking (bug 543)
[supertux.git]
/
src
/
object
/
anchor_point.cpp
diff --git
a/src/object/anchor_point.cpp
b/src/object/anchor_point.cpp
index
3b420c6
..
0c05191
100644
(file)
--- a/
src/object/anchor_point.cpp
+++ b/
src/object/anchor_point.cpp
@@
-21,7
+21,7
@@
#include <stdexcept>
#include <sstream>
#include <stdexcept>
#include <sstream>
-#include "math/rect.hpp"
+#include "math/rect
f
.hpp"
#include "util/log.hpp"
std::string anchor_point_to_string(AnchorPoint point)
#include "util/log.hpp"
std::string anchor_point_to_string(AnchorPoint point)
@@
-76,7
+76,7
@@
AnchorPoint string_to_anchor_point(const std::string& str)
throw std::runtime_error(msg.str());
}
throw std::runtime_error(msg.str());
}
-Vector get_anchor_pos(const Rect& rect, AnchorPoint point)
+Vector get_anchor_pos(const Rect
f
& rect, AnchorPoint point)
{
Vector result;
{
Vector result;
@@
-91,7
+91,7
@@
Vector get_anchor_pos(const Rect& rect, AnchorPoint point)
result.x = rect.get_right();
break;
default:
result.x = rect.get_right();
break;
default:
-#if
def
DEBUG
+#if
ndef N
DEBUG
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;
@@
-110,7
+110,7
@@
Vector get_anchor_pos(const Rect& rect, AnchorPoint point)
result.y = rect.get_bottom();
break;
default:
result.y = rect.get_bottom();
break;
default:
-#if
def
DEBUG
+#if
ndef N
DEBUG
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;
@@
-121,7
+121,7
@@
Vector get_anchor_pos(const Rect& rect, AnchorPoint point)
return result;
}
return result;
}
-Vector get_anchor_pos(const Rect& destrect, float width, float height,
+Vector get_anchor_pos(const Rect
f
& destrect, float width, float height,
AnchorPoint point)
{
Vector result;
AnchorPoint point)
{
Vector result;
@@
-137,7
+137,7
@@
Vector get_anchor_pos(const Rect& destrect, float width, float height,
result.x = destrect.get_right() - width;
break;
default:
result.x = destrect.get_right() - width;
break;
default:
-#if
def
DEBUG
+#if
ndef N
DEBUG
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;
@@
-156,7
+156,7
@@
Vector get_anchor_pos(const Rect& destrect, float width, float height,
result.y = destrect.get_bottom() - height;
break;
default:
result.y = destrect.get_bottom() - height;
break;
default:
-#if
def
DEBUG
+#if
ndef N
DEBUG
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;
throw std::runtime_error("Invalid anchor point found");
#endif
log_warning << "Invalid anchor point found" << std::endl;