X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Feditor.c;h=702646426b6a0d5ba9a652c9d20578295366d98f;hb=ff44d7908c64e48498fb490be744656c7c9b72f0;hp=e311541abdcf975346589cb53addf1787c0c24e6;hpb=608452efc3cb8d145639e0f401d85996dfc4e698;p=rocksndiamonds.git diff --git a/src/editor.c b/src/editor.c index e311541a..70264642 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 /* @@ -3691,6 +3692,7 @@ static int level_xpos = -1, level_ypos = -1; /* actual tile size used to display playfield drawing area */ static int ed_tilesize = DEFAULT_EDITOR_TILESIZE; +static int ed_tilesize_default = DEFAULT_EDITOR_TILESIZE; #define IN_ED_FIELD(x,y) IN_FIELD(x, y, ed_fieldx, ed_fieldy) @@ -8278,12 +8280,23 @@ 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; + ed_tilesize_default = DEFAULT_EDITOR_TILESIZE; + + if (level.game_engine_type == GAME_ENGINE_TYPE_MM) + { + ed_tilesize = DEFAULT_EDITOR_TILESIZE_MM; + ed_tilesize_default = 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); @@ -13263,7 +13276,7 @@ static void HandleControlButtons(struct GadgetInfo *gi) case GADGET_ID_ZOOM: // zoom level editor tile size in or out (or reset to default size) ed_tilesize = (button == 1 ? ed_tilesize * 2 : - button == 2 ? DEFAULT_EDITOR_TILESIZE : + button == 2 ? ed_tilesize_default : button == 3 ? ed_tilesize / 2 : ed_tilesize); // limit zoom level by upper and lower bound