projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
608452e
)
added setting correct editor tile size for MM style levels
author
Holger Schemel
<info@artsoft.org>
Sun, 5 Nov 2017 23:56:00 +0000
(
00:56
+0100)
committer
Holger Schemel
<info@artsoft.org>
Fri, 23 Mar 2018 22:21:15 +0000
(23:21 +0100)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index e311541abdcf975346589cb53addf1787c0c24e6..df592b1f528f39ff055a4add1f0623c4c4503711 100644
(file)
--- 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
/* 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)
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
// 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);
MAX_ED_FIELDX = getMaxEdFieldX(FALSE);
MAX_ED_FIELDY = getMaxEdFieldY(FALSE);