From: Holger Schemel Date: Sun, 5 Nov 2017 23:56:00 +0000 (+0100) Subject: added setting correct editor tile size for MM style levels X-Git-Tag: 4.1.0.0~66 X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=commitdiff_plain;h=e23e181a31fd4ff25df5b7a7407990ddc7cf042b added setting correct editor tile size for MM style levels --- 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);