summaryrefslogtreecommitdiffstats
path: root/src/math
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-07-23 21:41:27 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2012-07-23 21:41:27 +0200
commit9d592045317ca66be415e60ba4c2db90b5d7ad3e (patch)
tree921dd92c63b6260ea27d70eb7521e3a054d7f142 /src/math
parent8797569d33c4917eb8f8a1dc2341aac7b5815315 (diff)
downloadcolobot-9d592045317ca66be415e60ba4c2db90b5d7ad3e.tar.gz
colobot-9d592045317ca66be415e60ba4c2db90b5d7ad3e.tar.bz2
colobot-9d592045317ca66be415e60ba4c2db90b5d7ad3e.zip
Cursor drawing
- fixed cursor drawing in CEngine - changed event loop to generate more events
Diffstat (limited to 'src/math')
-rw-r--r--src/math/point.h6
-rw-r--r--src/math/vector.h6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/math/point.h b/src/math/point.h
index 80f80f4..740b275 100644
--- a/src/math/point.h
+++ b/src/math/point.h
@@ -74,6 +74,12 @@ struct Point
return (float*)this;
}
+ //! Returns the struct cast to <tt>const float*</tt> array; use with care!
+ inline const float* Array() const
+ {
+ return (const float*)this;
+ }
+
//! Returns the distance from (0,0) to the point (x,y)
inline float Length()
{
diff --git a/src/math/vector.h b/src/math/vector.h
index 65fc2f9..148d648 100644
--- a/src/math/vector.h
+++ b/src/math/vector.h
@@ -79,6 +79,12 @@ struct Vector
return (float*)this;
}
+ //! Returns the struct cast to <tt>const float*</tt> array; use with care!
+ inline const float* Array() const
+ {
+ return (const float*)this;
+ }
+
//! Returns the vector length
inline float Length() const
{