projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moved initial cycling of mirrors from 'after fading in' to 'after opening door' ...
[rocksndiamonds.git]
/
src
/
game_mm
/
mm_game.c
diff --git
a/src/game_mm/mm_game.c
b/src/game_mm/mm_game.c
index 4de58b82685bec2e28bdef152f38f30c16f217e7..8729d1652d9a4fac65a4e00b27652a7bc5090062 100644
(file)
--- a/
src/game_mm/mm_game.c
+++ b/
src/game_mm/mm_game.c
@@
-292,9
+292,6
@@
void InitGameEngine_MM()
{
int i, x, y;
{
int i, x, y;
- /* set global editor control values */
- editor.draw_walls_masked = FALSE;
-
/* set global game control values */
game_mm.num_cycle = 0;
game_mm.num_pacman = 0;
/* set global game control values */
game_mm.num_cycle = 0;
game_mm.num_pacman = 0;
@@
-310,6
+307,8
@@
void InitGameEngine_MM()
game_mm.game_over = FALSE;
game_mm.game_over_cause = 0;
game_mm.game_over = FALSE;
game_mm.game_over_cause = 0;
+ game_mm.laser_overload_value = 0;
+
/* set global laser control values (must be set before "InitLaser()") */
laser.start_edge.x = 0;
laser.start_edge.y = 0;
/* set global laser control values (must be set before "InitLaser()") */
laser.start_edge.x = 0;
laser.start_edge.y = 0;
@@
-351,7
+350,7
@@
void InitGameEngine_MM()
DrawLevel_MM();
}
DrawLevel_MM();
}
-void InitGame
Engine_MM_AfterFadingIn
()
+void InitGame
Actions_MM
()
{
InitCycleElements();
InitLaser();
{
InitCycleElements();
InitLaser();
@@
-571,6
+570,10
@@
void ScanLaser()
int element;
int end = 0, rf = laser.num_edges;
int element;
int end = 0, rf = laser.num_edges;
+ /* do not scan laser again after the game was lost for whatever reason */
+ if (game_mm.game_over)
+ return;
+
laser.overloaded = FALSE;
laser.stops_inside_element = FALSE;
laser.overloaded = FALSE;
laser.stops_inside_element = FALSE;
@@
-2444,6
+2447,10
@@
void ClickElement(int mx, int my, int button)
int element;
int x = (mx - SX) / TILEX, y = (my - SY) / TILEY;
int element;
int x = (mx - SX) / TILEX, y = (my - SY) / TILEY;
+ /* do not rotate objects hit by the laser after the game was solved */
+ if (game_mm.level_solved && Hit[x][y])
+ return;
+
if (button == MB_RELEASED)
{
new_button = TRUE;
if (button == MB_RELEASED)
{
new_button = TRUE;
@@
-2647,6
+2654,10
@@
void AutoRotateMirrors()
{
int element = Feld[x][y];
{
int element = Feld[x][y];
+ /* do not rotate objects hit by the laser after the game was solved */
+ if (game_mm.level_solved && Hit[x][y])
+ continue;
+
if (IS_DF_MIRROR_AUTO(element) ||
IS_GRID_WOOD_AUTO(element) ||
IS_GRID_STEEL_AUTO(element) ||
if (IS_DF_MIRROR_AUTO(element) ||
IS_GRID_WOOD_AUTO(element) ||
IS_GRID_STEEL_AUTO(element) ||
@@
-2913,6
+2924,8
@@
static void GameActions_MM_Ext(byte action[MAX_PLAYERS], boolean warp_mode)
laser.overload_value = 0;
}
laser.overload_value = 0;
}
+ game_mm.laser_overload_value = laser.overload_value;
+
if (laser.overload_value < MAX_LASER_OVERLOAD - 8)
{
int color_up = 0xFF * laser.overload_value / MAX_LASER_OVERLOAD;
if (laser.overload_value < MAX_LASER_OVERLOAD - 8)
{
int color_up = 0xFF * laser.overload_value / MAX_LASER_OVERLOAD;