From: Holger Schemel Date: Sun, 2 Feb 2020 15:43:24 +0000 (+0100) Subject: added limiting amoeba handling in EM engine to the playfield area X-Git-Tag: 4.2.0.0~160 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4a35c39bbc9ffdcbf15953cb699fc8147ccce25d;p=rocksndiamonds.git added limiting amoeba handling in EM engine to the playfield area This does not make a difference now, but will do when support for wrap-around levels is added (which will result in accessing tiles of the regular playfield via linked playfield buffer columns that will redirect off-playfield access to the opposite side of the playfield). --- diff --git a/src/game_em/logic.c b/src/game_em/logic.c index 89de4ee5..d126415b 100644 --- a/src/game_em/logic.c +++ b/src/game_em/logic.c @@ -6337,7 +6337,9 @@ void logic_3(void) x = lev.left - 1 + (random >> 10) % CAVE_WIDTH; y = lev.top - 1 + (random >> 20) % CAVE_HEIGHT; - Lamoeba(x, y); + if (x >= lev.left && x < lev.right && + y >= lev.top && y < lev.bottom) + Lamoeba(x, y); random = random * 129 + 1; }