projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added using cave buffer offsets in EM level conversion and game logic
[rocksndiamonds.git]
/
src
/
game_em
/
logic.c
diff --git
a/src/game_em/logic.c
b/src/game_em/logic.c
index 808db47d18ef338d4841b642cfc046df2f1bb863..89de4ee59f8828232880b579cc0cebcee5d31d2e 100644
(file)
--- a/
src/game_em/logic.c
+++ b/
src/game_em/logic.c
@@
-6273,8
+6273,8
@@
void logic_2(void)
seed = RandomEM;
score = 0;
seed = RandomEM;
score = 0;
- for (y =
1; y < CAVE_BUFFER_HEIGHT - 1
; y++)
- for (x =
0; x < CAVE_BUFFER_WIDTH
; x++)
+ for (y =
lev.top; y < lev.bottom
; y++)
+ for (x =
lev.left; x < lev.right
; x++)
handle_tile(x, y);
if (ply[0].alive || ply[1].alive || ply[2].alive || ply[3].alive)
handle_tile(x, y);
if (ply[0].alive || ply[1].alive || ply[2].alive || ply[3].alive)
@@
-6346,13
+6346,13
@@
void logic_3(void)
/* handle explosions */
/* handle explosions */
- for (y =
1; y < CAVE_BUFFER_HEIGHT - 1
; y++)
- for (x =
1; x < CAVE_BUFFER_WIDTH - 1
; x++)
+ for (y =
lev.top; y < lev.bottom
; y++)
+ for (x =
lev.left; x < lev.right
; x++)
Lexplode(x, y);
/* triple buffering */
Lexplode(x, y);
/* triple buffering */
- for (y =
0; y < CAVE_BUFFER_HEIGHT
; y++)
- for (x =
0; x < CAVE_BUFFER_WIDTH
; x++)
+ for (y =
lev.top; y < lev.bottom
; y++)
+ for (x =
lev.left; x < lev.right
; x++)
next[x][y] = cave[x][y];
}
next[x][y] = cave[x][y];
}