#define VALID_SCREEN_Y(y) ((y) < MIN_SCREEN_Y ? MIN_SCREEN_Y : \
(y) > MAX_SCREEN_Y ? MAX_SCREEN_Y : (y))
-#define PLAYER_SCREEN_X(p) ((( frame) * ply[p].oldx + \
- (8 - frame) * ply[p].x) * TILEX / 8 \
+#define PLAYER_SCREEN_X(p) (((7 - frame) * ply[p].oldx + \
+ (1 + frame) * ply[p].x) * TILEX / 8 \
- ((SCR_FIELDX - 1) * TILEX) / 2)
-#define PLAYER_SCREEN_Y(p) ((( frame) * ply[p].oldy + \
- (8 - frame) * ply[p].y) * TILEY / 8 \
+#define PLAYER_SCREEN_Y(p) (((7 - frame) * ply[p].oldy + \
+ (1 + frame) * ply[p].y) * TILEY / 8 \
- ((SCR_FIELDY - 1) * TILEY) / 2)
#define USE_EXTENDED_GRAPHICS_ENGINE 1
struct GraphicInfo_EM *g = &graphic_info_em_object[tile][frame];
if (!game.use_native_emc_graphics_engine)
- getGraphicSourceObjectExt_EM(g, tile, 7 - frame, x - lev.left, y - lev.top);
+ getGraphicSourceObjectExt_EM(g, tile, frame, x - lev.left, y - lev.top);
return g;
}
struct GraphicInfo_EM *g = &graphic_info_em_player[player_nr][anim][frame];
if (!game.use_native_emc_graphics_engine)
- getGraphicSourcePlayerExt_EM(g, player_nr, anim, 7 - frame);
+ getGraphicSourcePlayerExt_EM(g, player_nr, anim, frame);
return g;
}
for (y = lev.top; y < lev.bottom; y++)
for (x = lev.left; x < lev.right; x++)
SetGfxAnimation_EM(&graphic_info_em_object[lev.draw[x][y]][frame],
- lev.draw[x][y], 7 - frame,
+ lev.draw[x][y], frame,
x - lev.left, y - lev.top);
for (y = top; y < top + MAX_BUF_YSIZE; y++)
return;
/* x1/y1 are left/top and x2/y2 are right/down part of the player movement */
- x1 = (frame * ply->oldx + (8 - frame) * ply->x) * TILEX / 8;
- y1 = (frame * ply->oldy + (8 - frame) * ply->y) * TILEY / 8;
+ x1 = ((7 - frame) * ply->oldx + (1 + frame) * ply->x) * TILEX / 8;
+ y1 = ((7 - frame) * ply->oldy + (1 + frame) * ply->y) * TILEY / 8;
x2 = x1 + TILEX - 1;
y2 = y1 + TILEY - 1;
/* some casts to "int" are needed because of negative calculation values */
int dx = (int)ply->x - (int)ply->oldx;
int dy = (int)ply->y - (int)ply->oldy;
- int old_x = (int)ply->oldx + (7 - (int)frame) * dx / 8;
- int old_y = (int)ply->oldy + (7 - (int)frame) * dy / 8;
+ int old_x = (int)ply->oldx + (int)frame * dx / 8;
+ int old_y = (int)ply->oldy + (int)frame * dy / 8;
int new_x = old_x + SIGN(dx);
int new_y = old_y + SIGN(dy);
int old_sx = old_x % MAX_BUF_XSIZE;
int player_nr;
int x,y;
- frame = 6;
+ frame = 1;
player_nr = (game.centered_player_nr != -1 ? game.centered_player_nr : 0);
boolean has_action_graphics = (graphic != base_graphic);
boolean has_crumbled_graphics = (base_crumbled != base_graphic);
struct GraphicInfo *g = &graphic_info[graphic];
- struct GraphicInfo_EM *g_em = &graphic_info_em_object[i][7 - j];
+ struct GraphicInfo_EM *g_em = &graphic_info_em_object[i][j];
Bitmap *src_bitmap;
int src_x, src_y;
// ensure to get symmetric 3-frame, 2-delay animations as used in EM
Xspring);
// no separate animation for "smashed by rock" -- use rock instead
- struct GraphicInfo_EM *g_em = &graphic_info_em_object[i][7 - j];
- struct GraphicInfo_EM *g_xx = &graphic_info_em_object[e][7 - j];
+ struct GraphicInfo_EM *g_em = &graphic_info_em_object[i][j];
+ struct GraphicInfo_EM *g_xx = &graphic_info_em_object[e][j];
g_em->bitmap = g_xx->bitmap;
g_em->src_x = g_xx->src_x;
el_act_dir2img(effective_element, effective_action,
direction));
struct GraphicInfo *g = &graphic_info[graphic];
- struct GraphicInfo_EM *g_em = &graphic_info_em_player[p][i][7 - j];
+ struct GraphicInfo_EM *g_em = &graphic_info_em_player[p][i][j];
Bitmap *src_bitmap;
int src_x, src_y;
int sync_frame = j;