-
- SetClipMask(sprBitmap, sprBitmap->stored_clip_gc, spriteBitmap);
-
- SetClipOrigin(sprBitmap, sprBitmap->stored_clip_gc, x, y);
- BlitBitmapMasked(sprBitmap, screenBitmap,
- (spr / 8) * TILEX, (spr % 8) * TILEY, TILEX, TILEY,
- x, y);
-
- SetClipOrigin(sprBitmap, sprBitmap->stored_clip_gc,
- x - MAX_BUF_XSIZE * TILEX, y);
- BlitBitmapMasked(sprBitmap, screenBitmap,
- (spr / 8) * TILEX, (spr % 8) * TILEY, TILEX, TILEY,
- x - MAX_BUF_XSIZE * TILEX, y);
-
- SetClipOrigin(sprBitmap, sprBitmap->stored_clip_gc,
- x, y - MAX_BUF_YSIZE * TILEY);
- BlitBitmapMasked(sprBitmap, screenBitmap,
- (spr / 8) * TILEX, (spr % 8) * TILEY, TILEX, TILEY,
- x, y - MAX_BUF_YSIZE * TILEY);
-
- SetClipMask(sprBitmap, sprBitmap->stored_clip_gc, None);
+ {
+ /*
+ d? == 1:
+ 0-3: 0, 1
+ 4-7: 0, 1
+
+ d? == 2:
+ 0-3: 0, 1
+ 4-7: 1, 2
+ */
+
+ int dx = (ply->x - ply->oldx);
+ int dy = (ply->y - ply->oldy);
+ int old_x = ply->oldx ;
+ int old_y = ply->oldy ;
+ int new_x = ply->oldx ;
+ int new_y = ply->oldy ;
+ int xxx = (frame * ply->oldx + (8 - frame) * ply->x) / 8;
+ int yyy = (frame * ply->oldy + (8 - frame) * ply->y) / 8;
+ int tileXXX = Draw[ply->y][ply->x];
+ int tile = Draw[ply->y][ply->x];
+ struct GraphicInfo_EM *g = &graphic_info_em[tile][frame];
+ int xx = ply->x - 1, yy = ply->y;
+
+ printf("::: %d: %d,%d -> %d,%d: %d, %d, %d, %d [%d,%d] <-> ",
+ frame, ply->oldx, ply->oldy, ply->x, ply->y,
+ src_x, src_y, dst_x, dst_y, xxx, yyy);
+
+ if (g->width > 0 && g->height > 0)
+ {
+ src_x = g->src_x + g->src_offset_x;
+ src_y = g->src_y + g->src_offset_y;
+ dst_x = ply->x % MAX_BUF_XSIZE * TILEX + g->dst_offset_x;
+ dst_y = ply->y % MAX_BUF_YSIZE * TILEY + g->dst_offset_y;
+
+ SetClipOrigin(g->bitmap, g->bitmap->stored_clip_gc,
+ dst_x - src_x, dst_y - src_y);
+ BlitBitmapMasked(g->bitmap, screenBitmap,
+ src_x, src_y, g->width, g->height, dst_x, dst_y);
+
+ printf("::: %d, %d, %d, %d\n",
+ src_x, src_y, dst_x, dst_y);
+ }
+ }
+#else
+ SetClipOrigin(objBitmap, objBitmap->stored_clip_gc,
+ dst_x - src_x, dst_y - src_y);
+ BlitBitmapMasked(objBitmap, screenBitmap,
+ src_x, src_y, TILEX, TILEY, dst_x, dst_y);
+#endif
+#endif