int src_y = g->src_y + (get_backside ? g->offset2_y : 0);
int tilesize_capped = MIN(MAX(1, tilesize), TILESIZE);
+ // if no in-game graphics defined, always use standard graphic size
+ if (g->bitmaps[IMG_BITMAP_GAME] == NULL)
+ tilesize = TILESIZE;
+
if (tilesize == gfx.standard_tile_size)
src_bitmap = g->bitmaps[IMG_BITMAP_STANDARD];
else if (tilesize == game.tile_size)
void DrawFixedGraphicThruMaskExt(DrawBuffer *d, int dst_x, int dst_y,
int graphic, int frame)
{
+ struct GraphicInfo *g = &graphic_info[graphic];
Bitmap *src_bitmap;
int src_x, src_y;
getFixedGraphicSource(graphic, frame, &src_bitmap, &src_x, &src_y);
- BlitBitmapMasked(src_bitmap, d, src_x, src_y, TILEX, TILEY, dst_x, dst_y);
+ BlitBitmapMasked(src_bitmap, d, src_x, src_y, g->width, g->height,
+ dst_x, dst_y);
}
void DrawSizedGraphic(int x, int y, int graphic, int frame, int tilesize)
{
num_panel_steps = 2 * door_rect->height / door->step_offset;
door->panel.start_step = num_panel_steps - num_door_steps;
+ door->panel.start_step_closing = door->panel.start_step;
}
else
{
num_panel_steps = door_rect->height / door->step_offset;
door->panel.start_step = num_panel_steps - num_door_steps / 2;
+ door->panel.start_step_closing = door->panel.start_step;
door->panel.step_delay *= 2;
}
}
unsigned int door_delay_value;
int i;
- if (door_1.width < 0 || door_1.width > DXSIZE)
- door_1.width = DXSIZE;
- if (door_1.height < 0 || door_1.height > DYSIZE)
- door_1.height = DYSIZE;
- if (door_2.width < 0 || door_2.width > VXSIZE)
- door_2.width = VXSIZE;
- if (door_2.height < 0 || door_2.height > VYSIZE)
- door_2.height = VYSIZE;
-
if (door_state == DOOR_GET_STATE)
return (door1 | door2);
int vy = VY - outer_border;
int exsize = EXSIZE + 2 * outer_border;
- CloseDoor(DOOR_CLOSE_2);
-
/* draw bigger level editor toolbox window */
BlitBitmap(gfx1->bitmap, drawto, gfx1->src_x, gfx1->src_y,
top_border_width, top_border_height, ex, ey - top_border_height);
boolean init_video_buffer = FALSE;
boolean init_gadgets_and_toons = FALSE;
boolean init_em_graphics = FALSE;
+ boolean drawing_area_changed = FALSE;
if (viewport.window.width != WIN_XSIZE ||
viewport.window.height != WIN_YSIZE)
init_em_graphics = TRUE;
}
+ if (new_sx != SX ||
+ new_sy != SY ||
+ new_sxsize != SXSIZE ||
+ new_sysize != SYSIZE ||
+ new_real_sx != REAL_SX ||
+ new_real_sy != REAL_SY ||
+ new_full_sxsize != FULL_SXSIZE ||
+ new_full_sysize != FULL_SYSIZE)
+ {
+ if (!init_video_buffer)
+ drawing_area_changed = TRUE;
+ }
+
SX = new_sx;
SY = new_sy;
DX = new_dx;
SCR_FIELDX = new_scr_fieldx;
SCR_FIELDY = new_scr_fieldy;
+
+ gfx.drawing_area_changed = drawing_area_changed;
+
+ SetDrawDeactivationMask(REDRAW_NONE);
+ SetDrawBackgroundMask(REDRAW_FIELD);
}
if (init_video_buffer)
// printf("::: init_video_buffer\n");
InitVideoBuffer(WIN_XSIZE, WIN_YSIZE, DEFAULT_DEPTH, setup.fullscreen);
-
- SetDrawDeactivationMask(REDRAW_NONE);
- SetDrawBackgroundMask(REDRAW_FIELD);
}
if (init_gadgets_and_toons)