projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
85d7545
)
fixed using (manually changed) invalid values for editor zoom tile size
author
Holger Schemel
<info@artsoft.org>
Thu, 21 Feb 2019 07:24:04 +0000
(08:24 +0100)
committer
Holger Schemel
<info@artsoft.org>
Thu, 21 Feb 2019 07:24:04 +0000
(08:24 +0100)
src/editor.c
patch
|
blob
|
history
diff --git
a/src/editor.c
b/src/editor.c
index 093b229083d6f4e3539ebfd28ccd0559718e21c2..dc1b528f90daf8ebaa38ee3d5c06c7420e7a2009 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-8402,6
+8402,9
@@
static void InitZoomLevelSettings(int zoom_tilesize)
ed_tilesize = setup.auto_setup.editor_zoom_tilesize;
ed_tilesize_default = DEFAULT_EDITOR_TILESIZE;
+ // make sure that tile size is always a power of 2
+ ed_tilesize = (1 << log_2(ed_tilesize));
+
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
{
ed_tilesize = DEFAULT_EDITOR_TILESIZE_MM;