X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fgame_em%2Fconvert.c;h=996f0d21a039b73f326557062fd03ba709cff540;hb=dd11b3af00799f1dcd34481281bb219216ac9a4b;hp=dd2209009446fb5c04e021c40edc83a453cb4325;hpb=52ae89df67ad56dbb6302fd9e85ad45279554a4c;p=rocksndiamonds.git diff --git a/src/game_em/convert.c b/src/game_em/convert.c index dd220900..996f0d21 100644 --- a/src/game_em/convert.c +++ b/src/game_em/convert.c @@ -911,8 +911,8 @@ void convert_em_level(unsigned char *src, int file_version) } /* first fill the complete playfield with the default border element */ - for (y = 0; y < CAVE_HEIGHT; y++) - for (x = 0; x < CAVE_WIDTH; x++) + for (y = 0; y < CAVE_BUFFER_HEIGHT; y++) + for (x = 0; x < CAVE_BUFFER_WIDTH; x++) native_em_level.cave[x][y] = Zborder; /* then copy the real level contents from level file into the playfield */ @@ -938,16 +938,16 @@ void prepare_em_level(void) /* reset all runtime variables to their initial values */ - for (y = 0; y < CAVE_HEIGHT; y++) - for (x = 0; x < CAVE_WIDTH; x++) + for (y = 0; y < CAVE_BUFFER_HEIGHT; y++) + for (x = 0; x < CAVE_BUFFER_WIDTH; x++) lev.cave[x][y] = native_em_level.cave[x][y]; - for (y = 0; y < CAVE_HEIGHT; y++) - for (x = 0; x < CAVE_WIDTH; x++) + for (y = 0; y < CAVE_BUFFER_HEIGHT; y++) + for (x = 0; x < CAVE_BUFFER_WIDTH; x++) lev.next[x][y] = lev.cave[x][y]; - for (y = 0; y < CAVE_HEIGHT; y++) - for (x = 0; x < CAVE_WIDTH; x++) + for (y = 0; y < CAVE_BUFFER_HEIGHT; y++) + for (x = 0; x < CAVE_BUFFER_WIDTH; x++) lev.draw[x][y] = lev.cave[x][y]; lev.time_initial = lev.time_seconds;