projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20110322-1-src
[rocksndiamonds.git]
/
src
/
editor.c
diff --git
a/src/editor.c
b/src/editor.c
index 83df2e15c5048d51ef8dc7bce33d29cc7f367ec4..53123487787f240b81d36fff743e1389d7da5d8e 100644
(file)
--- a/
src/editor.c
+++ b/
src/editor.c
@@
-971,8
+971,13
@@
#define RANDOM_USE_QUANTITY 1
/* maximal size of level editor drawing area */
#define RANDOM_USE_QUANTITY 1
/* maximal size of level editor drawing area */
+#if NEW_TILESIZE
+#define MAX_ED_FIELDX (SCR_FIELDX)
+#define MAX_ED_FIELDY (SCR_FIELDY - 1)
+#else
#define MAX_ED_FIELDX (2 * SCR_FIELDX)
#define MAX_ED_FIELDY (2 * SCR_FIELDY - 1)
#define MAX_ED_FIELDX (2 * SCR_FIELDX)
#define MAX_ED_FIELDY (2 * SCR_FIELDY - 1)
+#endif
/*
/*
@@
-2710,7
+2715,7
@@
static struct
GADGET_ID_CONTINUOUS_SNAPPING, GADGET_ID_NONE,
&level.continuous_snapping,
NULL,
GADGET_ID_CONTINUOUS_SNAPPING, GADGET_ID_NONE,
&level.continuous_snapping,
NULL,
- "continuo
s snapping",
"use snapping without releasing key"
+ "continuo
us snapping",
"use snapping without releasing key"
},
{
ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(7),
},
{
ED_ELEMENT_SETTINGS_XPOS(0), ED_ELEMENT_SETTINGS_YPOS(7),
@@
-5143,7
+5148,7
@@
static void DrawElementBorder(int dest_x, int dest_y, int width, int height,
int by2 = TILEY - by;
int i;
int by2 = TILEY - by;
int i;
- getGraphicSource(border_graphic, 0, &src_bitmap, &src_x, &src_y);
+ get
Fixed
GraphicSource(border_graphic, 0, &src_bitmap, &src_x, &src_y);
BlitBitmap(src_bitmap, drawto, src_x, src_y,
bx, by, dest_x - bx, dest_y - by);
BlitBitmap(src_bitmap, drawto, src_x, src_y,
bx, by, dest_x - bx, dest_y - by);
@@
-7409,6
+7414,11
@@
void DrawLevelEd()
FadeOut(REDRAW_FIELD);
#endif
FadeOut(REDRAW_FIELD);
#endif
+#if 1
+ /* needed if different viewport properties defined for editor */
+ ChangeViewportPropertiesIfNeeded();
+#endif
+
OpenDoor(DOOR_OPEN_2 | DOOR_NO_DELAY);
#if DEBUG
OpenDoor(DOOR_OPEN_2 | DOOR_NO_DELAY);
#if DEBUG
@@
-7438,6
+7448,10
@@
void DrawLevelEd()
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
DOOR_GFX_PAGEX6, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
BlitBitmap(graphic_info[IMG_GLOBAL_DOOR].bitmap, drawto,
DOOR_GFX_PAGEX6, DOOR_GFX_PAGEY1, DXSIZE, DYSIZE, DX, DY);
+#if 0
+ printf("::: %d, %d / %d, %d\n", VX, VY, EX, EY);
+#endif
+
/* draw bigger door */
DrawSpecialEditorDoor();
/* draw bigger door */
DrawSpecialEditorDoor();
@@
-8164,7
+8178,7
@@
static int PrintElementDescriptionFromFile(char *filename, int start_line)
int max_lines_per_screen = (SYSIZE - pad_y) / font_height - 1;
return DrawTextFile(sx, sy, filename, font_nr, max_chars_per_line, -1,
int max_lines_per_screen = (SYSIZE - pad_y) / font_height - 1;
return DrawTextFile(sx, sy, filename, font_nr, max_chars_per_line, -1,
- max_lines_per_screen, -1, TRUE, FALSE, FALSE);
+ max_lines_per_screen,
0,
-1, TRUE, FALSE, FALSE);
}
static void DrawPropertiesInfo()
}
static void DrawPropertiesInfo()
@@
-8803,7
+8817,7
@@
static void DrawEditorElementAnimation(int x, int y)
ANIM_MODE(graphic) == ANIM_CE_SCORE ?
custom_element.collect_score_initial : FrameCounter);
ANIM_MODE(graphic) == ANIM_CE_SCORE ?
custom_element.collect_score_initial : FrameCounter);
- DrawGraphicAnimationExt(drawto, x, y, graphic, frame, NO_MASKING);
+ Draw
Fixed
GraphicAnimationExt(drawto, x, y, graphic, frame, NO_MASKING);
}
static void DrawEditorElementName(int x, int y, int element)
}
static void DrawEditorElementName(int x, int y, int element)
@@
-10708,10
+10722,10
@@
static void HandleDrawingAreas(struct GadgetInfo *gi)
gi->y + sy * MINI_TILEY,
el2edimg(new_element));
else
gi->y + sy * MINI_TILEY,
el2edimg(new_element));
else
- DrawGraphicExt(drawto,
- gi->x + sx * TILEX,
- gi->y + sy * TILEY,
- el2img(new_element), 0);
+ Draw
Fixed
GraphicExt(drawto,
+
gi->x + sx * TILEX,
+
gi->y + sy * TILEY,
+
el2img(new_element), 0);
if (id == GADGET_ID_CUSTOM_GRAPHIC)
new_element = GFX_ELEMENT(new_element);
if (id == GADGET_ID_CUSTOM_GRAPHIC)
new_element = GFX_ELEMENT(new_element);
@@
-11505,7
+11519,9
@@
static void HandleControlButtons(struct GadgetInfo *gi)
BackToFront(); /* force redraw of undrawn special door */
BackToFront(); /* force redraw of undrawn special door */
+#if 0
DrawCompleteVideoDisplay();
DrawCompleteVideoDisplay();
+#endif
level_editor_test_game = TRUE;
level_editor_test_game = TRUE;