From 6c2aa41b8a642bcbb41e2665fb5c426fe5da27d2 Mon Sep 17 00:00:00 2001 From: buliabyak Date: Sun, 2 Dec 2007 23:05:58 +0000 Subject: [PATCH] fix pmg --- src/dialogs/clonetiler.cpp | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/dialogs/clonetiler.cpp b/src/dialogs/clonetiler.cpp index 60750796f..09086f1b2 100644 --- a/src/dialogs/clonetiler.cpp +++ b/src/dialogs/clonetiler.cpp @@ -348,14 +348,18 @@ clonetiler_get_transform ( break; case TILE_PMG: - if (y % 4 == 0) { - return d_s_r * rect_translate; - } else if (y % 4 == 1) { - return d_s_r * flip_y * rect_translate; - } else if (y % 4 == 2) { - return d_s_r * flip_x * rect_translate; - } else if (y % 4 == 3) { - return d_s_r * flip_x * flip_y * rect_translate; + if (y % 2 == 0) { + if (x % 2 == 0) { + return d_s_r * rect_translate; + } else { + return d_s_r * rotate_180_c * rect_translate; + } + } else { + if (x % 2 == 0) { + return d_s_r * flip_y * rect_translate; + } else { + return d_s_r * rotate_180_c * flip_y * rect_translate; + } } break; -- 2.30.2