aboutsummaryrefslogtreecommitdiff
path: root/sources/TZR_ScreenTransform.c
diff options
context:
space:
mode:
Diffstat (limited to 'sources/TZR_ScreenTransform.c')
-rw-r--r--sources/TZR_ScreenTransform.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/sources/TZR_ScreenTransform.c b/sources/TZR_ScreenTransform.c
new file mode 100644
index 0000000..d936781
--- /dev/null
+++ b/sources/TZR_ScreenTransform.c
@@ -0,0 +1,16 @@
+#include "TZR_globals.h"
+
+void
+TZR_ScreenTransform(int *x, int *y)
+{
+ if (___tzr_scale == 0.0)
+ return;
+ if (x != NULL) {
+ *x -= ___tzr_off_x;
+ *x /= ___tzr_scale;
+ }
+ if (y != NULL) {
+ *y -= ___tzr_off_y;
+ *y /= ___tzr_scale;
+ }
+}