void subCalculateScreenScrollPos()
{
- int ax, ay;
-
#if 1
int jump_pos = TILEX / 2;
+ /* handle wrap-around */
if (MurphyScreenXPos < -jump_pos)
{
MurphyScreenXPos = FieldWidth * TILEX + MurphyScreenXPos;
// printf("::: ExplosionShake [%d]\n", FrameCounter);
}
- {
- ax = SXSIZE / 2;
- ay = SYSIZE / 2;
- }
-
- ScreenScrollXPos = (MurphyScreenXPos + TILEX / 2) - ax;
- ScreenScrollYPos = (MurphyScreenYPos + TILEY / 2) - ay;
+ ScreenScrollXPos = MurphyScreenXPos - (SCR_FIELDX / 2) * TILESIZE;
+ ScreenScrollYPos = MurphyScreenYPos - (SCR_FIELDY / 2) * TILESIZE;
}