From e23e181a31fd4ff25df5b7a7407990ddc7cf042b Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Mon, 6 Nov 2017 00:56:00 +0100 Subject: [PATCH] added setting correct editor tile size for MM style levels --- src/editor.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/editor.c b/src/editor.c index e311541a..df592b1f 100644 --- a/src/editor.c +++ b/src/editor.c @@ -1093,6 +1093,7 @@ /* default value for element tile size in drawing area */ #define DEFAULT_EDITOR_TILESIZE MINI_TILESIZE +#define DEFAULT_EDITOR_TILESIZE_MM TILESIZE /* @@ -8278,12 +8279,19 @@ static int getMaxEdFieldY(boolean has_scrollbar) void InitZoomLevelSettings(int zoom_tilesize) { if (zoom_tilesize == -1) - zoom_tilesize = setup.auto_setup.editor_zoom_tilesize; + { + ed_tilesize = setup.auto_setup.editor_zoom_tilesize; + + if (level.game_engine_type == GAME_ENGINE_TYPE_MM) + ed_tilesize = DEFAULT_EDITOR_TILESIZE_MM; + } // limit zoom tilesize by upper and lower bound - zoom_tilesize = MIN(MAX(MICRO_TILESIZE, zoom_tilesize), TILESIZE); + ed_tilesize = MIN(MAX(MICRO_TILESIZE, ed_tilesize), TILESIZE); - ed_tilesize = setup.auto_setup.editor_zoom_tilesize = zoom_tilesize; + // store zoom tilesize in auto setup file only if it was manually changed + if (zoom_tilesize != -1) + setup.auto_setup.editor_zoom_tilesize = ed_tilesize; MAX_ED_FIELDX = getMaxEdFieldX(FALSE); MAX_ED_FIELDY = getMaxEdFieldY(FALSE); -- 2.34.1