X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fgame_em%2Fconvert.c;h=17f709853ebef7e9625058eeb1508e59ad963d7c;hb=2851c280138444b53cf088e4e4f3e7ef8787022c;hp=65efdcc13f78f88ee89ed9a0851bb08e68620126;hpb=a19843471dc3ebab17890f54cb2eb8aa82a7ac8a;p=rocksndiamonds.git diff --git a/src/game_em/convert.c b/src/game_em/convert.c index 65efdcc1..17f70985 100644 --- a/src/game_em/convert.c +++ b/src/game_em/convert.c @@ -536,7 +536,7 @@ static unsigned short remap_emerald[256] = Xblank, Xsand, Xsand, Xsand, Xsand_stone, Xsand_stone, Xsand_stone, Xsand, - Xstone, Xslidewall_ew, Xslidewall_ns, Xdynamite_1, + Xstone, Xslide_ew, Xslide_ns, Xdynamite_1, Xdynamite_2, Xdynamite_3, Xdynamite_4, Xacid_s, Xexit_1, Xexit_2, Xexit_3, Xballoon, @@ -945,6 +945,20 @@ void prepare_em_level(void) lev.right = lev.left + lev.width; lev.bottom = lev.top + lev.height; + /* add linked cave buffer columns for wrap-around movement */ + for (x = 0; x < lev.left; x++) + { + lev.cavecol[x] = lev.cavecol[lev.width + x]; + lev.nextcol[x] = lev.nextcol[lev.width + x]; + lev.drawcol[x] = lev.drawcol[lev.width + x]; + lev.boomcol[x] = lev.boomcol[lev.width + x]; + + lev.cavecol[lev.right + x] = lev.cavecol[lev.left + x]; + lev.nextcol[lev.right + x] = lev.nextcol[lev.left + x]; + lev.drawcol[lev.right + x] = lev.drawcol[lev.left + x]; + lev.boomcol[lev.right + x] = lev.boomcol[lev.left + x]; + } + for (x = 0; x < lev.width; x++) for (y = 0; y < lev.height; y++) lev.cave[lev.left + x][lev.top + y] = native_em_level.cave[x][y];