From: Holger Schemel Date: Wed, 10 Oct 2018 19:27:50 +0000 (+0200) Subject: added playfield array "Last[][]" to store tile from last game frame X-Git-Tag: 4.1.2.0~145 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=a6d0395ba3236badfa052d8329bb42f9a440433f;p=rocksndiamonds.git added playfield array "Last[][]" to store tile from last game frame --- diff --git a/src/game.c b/src/game.c index 3255b428..fefe353d 100644 --- a/src/game.c +++ b/src/game.c @@ -3595,7 +3595,7 @@ void InitGame(void) SCAN_PLAYFIELD(x, y) { - Feld[x][y] = level.field[x][y]; + Feld[x][y] = Last[x][y] = level.field[x][y]; MovPos[x][y] = MovDir[x][y] = MovDelay[x][y] = 0; ChangeDelay[x][y] = 0; ChangePage[x][y] = -1; @@ -11733,6 +11733,8 @@ void GameActions_RND(void) SCAN_PLAYFIELD(x, y) { + Last[x][y] = Feld[x][y]; + ChangeCount[x][y] = 0; ChangeEvent[x][y] = -1; diff --git a/src/main.c b/src/main.c index 3f4ea31d..0e266755 100644 --- a/src/main.c +++ b/src/main.c @@ -42,6 +42,7 @@ SDL_Thread *server_thread; int key_joystick_mapping = 0; short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +short Last[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; diff --git a/src/main.h b/src/main.h index b66da1d2..935d6020 100644 --- a/src/main.h +++ b/src/main.h @@ -3552,6 +3552,7 @@ extern SDL_Thread *server_thread; extern int key_joystick_mapping; extern short Feld[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; +extern short Last[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern short MovPos[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern short MovDir[MAX_LEV_FIELDX][MAX_LEV_FIELDY]; extern short MovDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];