X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_sp%2FMainGameLoop.c;h=b72852921178bfc94c229f60176ddd92ade58401;hb=475d747d7f6122bf9b62ccf1518fc7e8fc0f201c;hp=a82c8732f4846393e958441d10db97067b2a1528;hpb=4591885cdbcfec145d1ac0510fed1519af1eea1d;p=rocksndiamonds.git diff --git a/src/game_sp/MainGameLoop.c b/src/game_sp/MainGameLoop.c index a82c8732..b7285292 100644 --- a/src/game_sp/MainGameLoop.c +++ b/src/game_sp/MainGameLoop.c @@ -6,7 +6,7 @@ boolean bPlaying; -int LeadOutCounter, EnterRepeatCounter; +int LeadOutCounter; int ExitToMenuFlag; boolean AutoScrollFlag; @@ -98,11 +98,10 @@ locExitMainGameLoop: void subCalculateScreenScrollPos() { - int ax, Ay; - #if 1 int jump_pos = TILEX / 2; + /* handle wrap-around */ if (MurphyScreenXPos < -jump_pos) { MurphyScreenXPos = FieldWidth * TILEX + MurphyScreenXPos; @@ -122,11 +121,6 @@ void subCalculateScreenScrollPos() // printf("::: ExplosionShake [%d]\n", FrameCounter); } - { - ax = SXSIZE / 2; - Ay = SYSIZE / 2; - } - - ScreenScrollXPos = Stretch * (MurphyScreenXPos + TILEX / 2) - ax; - ScreenScrollYPos = Stretch * (MurphyScreenYPos + TILEY / 2) - Ay; + ScreenScrollXPos = MurphyScreenXPos - (SCR_FIELDX / 2) * TILESIZE; + ScreenScrollYPos = MurphyScreenYPos - (SCR_FIELDY / 2) * TILESIZE; }