X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Feditor.c;h=dc1b528f90daf8ebaa38ee3d5c06c7420e7a2009;hp=093b229083d6f4e3539ebfd28ccd0559718e21c2;hb=0fefbeaf965f087a359f7ae6845bcefff7a71389;hpb=1fc11ecd0789cf873639c9bbbff6f72656abac08 diff --git a/src/editor.c b/src/editor.c index 093b2290..dc1b528f 100644 --- 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;