diff options
Diffstat (limited to 'tvision/classes/tpoint.cc')
-rw-r--r-- | tvision/classes/tpoint.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tvision/classes/tpoint.cc b/tvision/classes/tpoint.cc new file mode 100644 index 0000000..7a1dd8c --- /dev/null +++ b/tvision/classes/tpoint.cc @@ -0,0 +1,42 @@ +/* + * Turbo Vision - Version 2.0 + * + * Copyright (c) 1994 by Borland International + * All Rights Reserved. + * + +Modified by Robert H”hne to be used for RHIDE. + + * + * + */ + +#define Uses_TPoint +#include <tv.h> + +TPoint operator - ( const TPoint& one, const TPoint& two ) +{ + TPoint result; + result.x = one.x - two.x; + result.y = one.y - two.y; + return result; +} + +TPoint operator + ( const TPoint& one, const TPoint& two ) +{ + TPoint result; + result.x = one.x + two.x; + result.y = one.y + two.y; + return result; +} + +int operator == ( const TPoint& one, const TPoint& two ) +{ + return one.x == two.x && one.y == two.y; +} + +int operator!= ( const TPoint& one, const TPoint& two ) +{ + return one.x != two.x || one.y != two.y; +} + |