summaryrefslogtreecommitdiff
path: root/sigalatvision/lib/TPoint.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sigalatvision/lib/TPoint.cc')
-rw-r--r--sigalatvision/lib/TPoint.cc39
1 files changed, 39 insertions, 0 deletions
diff --git a/sigalatvision/lib/TPoint.cc b/sigalatvision/lib/TPoint.cc
new file mode 100644
index 0000000..b971f6e
--- /dev/null
+++ b/sigalatvision/lib/TPoint.cc
@@ -0,0 +1,39 @@
+/*
+ * TPoint.cc
+ *
+ * Turbo Vision - Version 2.0
+ *
+ * Copyright (c) 1994 by Borland International
+ * All Rights Reserved.
+ *
+ * Modified by Sergio Sigala <sergio@sigala.it>
+ */
+
+#define Uses_TPoint
+#include <tvision/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;
+}