game_mm.game_over_cause = 0;
game_mm.laser_overload_value = 0;
+ game_mm.laser_enabled = FALSE;
/* set global laser control values (must be set before "InitLaser()") */
laser.start_edge.x = 0;
{
DrawLaserExt(start_edge, laser.num_edges - start_edge, mode);
}
+
+ game_mm.laser_enabled = mode;
+}
+
+void DrawLaser_MM()
+{
+ DrawLaser(0, game_mm.laser_enabled);
}
boolean HitElement(int element, int hit_mask)
}
StopSound_MM(SND_MM_GAME_HEALTH_CHARGING);
+#if 0
FadeMusic();
+#endif
DrawLaser(0, DL_LASER_DISABLED);
game_mm.game_over = TRUE;
CT -= Ct;
- if (element == EL_BOMB && CT > 75)
+ if (element == EL_BOMB && CT > native_mm_level.time_bomb)
{
if (game_mm.cheat_no_explosion)
return;
return;
}
- if (element == EL_FUSE_ON && CT > 25)
+ if (element == EL_FUSE_ON && CT > native_mm_level.time_fuse)
{
laser.fuse_off = TRUE;
laser.fuse_x = ELX;
DrawGraphic_MM(ELX, ELY, IMG_MM_FUSE);
}
- if (element == EL_BALL_GRAY && CT > 75)
+ if (element == EL_BALL_GRAY && CT > native_mm_level.time_ball)
{
static int new_elements[] =
{
}
if ((element == EL_BLOCK_WOOD || element == EL_BLOCK_STONE) &&
- laser.stops_inside_element && CT > 75)
+ laser.stops_inside_element && CT > native_mm_level.time_block)
{
int x, y;
int k;
break;
}
}
+
+
+/* ------------------------------------------------------------------------- */
+/* Mirror Magic game engine snapshot handling functions */
+/* ------------------------------------------------------------------------- */
+
+void SaveEngineSnapshotValues_MM(ListNode **buffers)
+{
+ int x, y;
+
+ engine_snapshot_mm.game_mm = game_mm;
+ engine_snapshot_mm.laser = laser;
+
+ for (x = 0; x < MAX_PLAYFIELD_WIDTH; x++)
+ {
+ for (y = 0; y < MAX_PLAYFIELD_HEIGHT; y++)
+ {
+ engine_snapshot_mm.Ur[x][y] = Ur[x][y];
+ engine_snapshot_mm.Hit[x][y] = Hit[x][y];
+ engine_snapshot_mm.Box[x][y] = Box[x][y];
+ engine_snapshot_mm.Angle[x][y] = Angle[x][y];
+ engine_snapshot_mm.Frame[x][y] = Frame[x][y];
+ }
+ }
+
+ engine_snapshot_mm.LX = LX;
+ engine_snapshot_mm.LY = LY;
+ engine_snapshot_mm.XS = XS;
+ engine_snapshot_mm.YS = YS;
+ engine_snapshot_mm.ELX = ELX;
+ engine_snapshot_mm.ELY = ELY;
+ engine_snapshot_mm.CT = CT;
+ engine_snapshot_mm.Ct = Ct;
+
+ engine_snapshot_mm.last_LX = last_LX;
+ engine_snapshot_mm.last_LY = last_LY;
+ engine_snapshot_mm.last_hit_mask = last_hit_mask;
+ engine_snapshot_mm.hold_x = hold_x;
+ engine_snapshot_mm.hold_y = hold_y;
+ engine_snapshot_mm.pacman_nr = pacman_nr;
+
+ engine_snapshot_mm.rotate_delay = rotate_delay;
+ engine_snapshot_mm.pacman_delay = pacman_delay;
+ engine_snapshot_mm.energy_delay = energy_delay;
+ engine_snapshot_mm.overload_delay = overload_delay;
+}
+
+void LoadEngineSnapshotValues_MM()
+{
+ int x, y;
+
+ /* stored engine snapshot buffers already restored at this point */
+
+ game_mm = engine_snapshot_mm.game_mm;
+ laser = engine_snapshot_mm.laser;
+
+ for (x = 0; x < MAX_PLAYFIELD_WIDTH; x++)
+ {
+ for (y = 0; y < MAX_PLAYFIELD_HEIGHT; y++)
+ {
+ Ur[x][y] = engine_snapshot_mm.Ur[x][y];
+ Hit[x][y] = engine_snapshot_mm.Hit[x][y];
+ Box[x][y] = engine_snapshot_mm.Box[x][y];
+ Angle[x][y] = engine_snapshot_mm.Angle[x][y];
+ Frame[x][y] = engine_snapshot_mm.Frame[x][y];
+ }
+ }
+
+ LX = engine_snapshot_mm.LX;
+ LY = engine_snapshot_mm.LY;
+ XS = engine_snapshot_mm.XS;
+ YS = engine_snapshot_mm.YS;
+ ELX = engine_snapshot_mm.ELX;
+ ELY = engine_snapshot_mm.ELY;
+ CT = engine_snapshot_mm.CT;
+ Ct = engine_snapshot_mm.Ct;
+
+ last_LX = engine_snapshot_mm.last_LX;
+ last_LY = engine_snapshot_mm.last_LY;
+ last_hit_mask = engine_snapshot_mm.last_hit_mask;
+ hold_x = engine_snapshot_mm.hold_x;
+ hold_y = engine_snapshot_mm.hold_y;
+ pacman_nr = engine_snapshot_mm.pacman_nr;
+
+ rotate_delay = engine_snapshot_mm.rotate_delay;
+ pacman_delay = engine_snapshot_mm.pacman_delay;
+ energy_delay = engine_snapshot_mm.energy_delay;
+ overload_delay = engine_snapshot_mm.overload_delay;
+
+ RedrawPlayfield_MM(TRUE);
+}