projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d271674
)
fixed bug with shifted global playfield animations during envelope requests
author
Holger Schemel
<info@artsoft.org>
Sun, 1 Oct 2023 17:45:35 +0000
(19:45 +0200)
committer
Holger Schemel
<info@artsoft.org>
Sun, 1 Oct 2023 17:45:35 +0000
(19:45 +0200)
src/anim.c
patch
|
blob
|
history
diff --git
a/src/anim.c
b/src/anim.c
index 9611fa67d2cbd4139aaba70cd6ebf0d8c8d4c4fd..4d67b458378eb27206df6d91bd7a12344a32edff 100644
(file)
--- a/
src/anim.c
+++ b/
src/anim.c
@@
-1732,10
+1732,13
@@
static int HandleGlobalAnim_Part(struct GlobalAnimPartControlInfo *part,
if (c->position == POS_CE)
{
// calculate playfield position (with scrolling) for related CE tile
if (c->position == POS_CE)
{
// calculate playfield position (with scrolling) for related CE tile
+ // (do not use FX/FY, which are incorrect during envelope requests)
+ int FX0 = 2 * TILEX_VAR; // same as FX during DRAW_TO_FIELDBUFFER
+ int FY0 = 2 * TILEY_VAR; // same as FY during DRAW_TO_FIELDBUFFER
int fx = getFieldbufferOffsetX_RND(ScreenMovDir, ScreenGfxPos);
int fy = getFieldbufferOffsetY_RND(ScreenMovDir, ScreenGfxPos);
int fx = getFieldbufferOffsetX_RND(ScreenMovDir, ScreenGfxPos);
int fy = getFieldbufferOffsetY_RND(ScreenMovDir, ScreenGfxPos);
- int sx = FX + SCREENX(part->tile_x) * TILEX_VAR;
- int sy = FY + SCREENY(part->tile_y) * TILEY_VAR;
+ int sx = FX
0
+ SCREENX(part->tile_x) * TILEX_VAR;
+ int sy = FY
0
+ SCREENY(part->tile_y) * TILEY_VAR;
int cx = SX - REAL_SX;
int cy = SY - REAL_SY;
int x = sx - fx + cx;
int cx = SX - REAL_SX;
int cy = SY - REAL_SY;
int x = sx - fx + cx;