projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e23e181
)
added setting correct default editor tile size (depending on game engine)
author
Holger Schemel
<info@artsoft.org>
Mon, 6 Nov 2017 00:01:19 +0000
(
01:01
+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 df592b1f528f39ff055a4add1f0623c4c4503711..702646426b6a0d5ba9a652c9d20578295366d98f 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-3692,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;
/* 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)
#define IN_ED_FIELD(x,y) IN_FIELD(x, y, ed_fieldx, ed_fieldy)
@@
-8281,9
+8282,13
@@
void InitZoomLevelSettings(int zoom_tilesize)
if (zoom_tilesize == -1)
{
ed_tilesize = setup.auto_setup.editor_zoom_tilesize;
if (zoom_tilesize == -1)
{
ed_tilesize = setup.auto_setup.editor_zoom_tilesize;
+ ed_tilesize_default = DEFAULT_EDITOR_TILESIZE;
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
if (level.game_engine_type == GAME_ENGINE_TYPE_MM)
+ {
ed_tilesize = DEFAULT_EDITOR_TILESIZE_MM;
ed_tilesize = DEFAULT_EDITOR_TILESIZE_MM;
+ ed_tilesize_default = DEFAULT_EDITOR_TILESIZE_MM;
+ }
}
// limit zoom tilesize by upper and lower bound
}
// limit zoom tilesize by upper and lower bound
@@
-13271,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 :
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
button == 3 ? ed_tilesize / 2 : ed_tilesize);
// limit zoom level by upper and lower bound