projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added separate playfield and buffer sizes for EM engine caves
[rocksndiamonds.git]
/
src
/
game_em
/
convert.c
diff --git
a/src/game_em/convert.c
b/src/game_em/convert.c
index dd2209009446fb5c04e021c40edc83a453cb4325..996f0d21a039b73f326557062fd03ba709cff540 100644
(file)
--- 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 */
}
/* 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 */
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 */
/* 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];
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];
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;
lev.draw[x][y] = lev.cave[x][y];
lev.time_initial = lev.time_seconds;