projects
/
rocksndiamonds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rnd-20051125-1-src
[rocksndiamonds.git]
/
src
/
tape.c
diff --git
a/src/tape.c
b/src/tape.c
index acb05d86dfd15d2cd5e0e7841d059d8ef695a307..4406288567f7453dd81a7da6b3fb7b253e922b9c 100644
(file)
--- a/
src/tape.c
+++ b/
src/tape.c
@@
-711,13
+711,19
@@
static void TapeRewind()
InitRND(tape.random_seed);
}
InitRND(tape.random_seed);
}
-void TapeStartRecording()
+static void TapeSetRandomSeed(long random_seed)
+{
+ tape.random_seed = InitRND(random_seed);
+}
+
+void TapeStartRecording(long random_seed)
{
if (!TAPE_IS_STOPPED(tape))
TapeStop();
TapeErase();
TapeRewind();
{
if (!TAPE_IS_STOPPED(tape))
TapeStop();
TapeErase();
TapeRewind();
+ TapeSetRandomSeed(random_seed);
tape.recording = TRUE;
tape.recording = TRUE;
@@
-732,7
+738,7
@@
void TapeStartRecording()
static void TapeStartGameRecording()
{
static void TapeStartGameRecording()
{
- TapeStartRecording();
+ TapeStartRecording(
NEW_RANDOMIZE
);
#if defined(NETWORK_AVALIABLE)
if (options.network)
#if defined(NETWORK_AVALIABLE)
if (options.network)
@@
-1297,6
+1303,12
@@
void AutoPlayTape()
continue;
}
continue;
}
+#if 0
+ /* ACTIVATE THIS FOR LOADING/TESTING OF LEVELS ONLY */
+ printf("(only testing level)\n");
+ continue;
+#endif
+
LoadSolutionTape(level_nr);
#if 1
if (tape.no_valid_file)
LoadSolutionTape(level_nr);
#if 1
if (tape.no_valid_file)
@@
-1339,6
+1351,7
@@
void AutoPlayTape()
printf(" %03d", i);
}
printf(" %03d", i);
}
+#if 0
if (num_tape_missing > 0)
{
printf(", NO TAPE:");
if (num_tape_missing > 0)
{
printf(", NO TAPE:");
@@
-1346,6
+1359,7
@@
void AutoPlayTape()
if (tape_missing[i])
printf(" %03d", i);
}
if (tape_missing[i])
printf(" %03d", i);
}
+#endif
printf("\n");
printf_line("=", 79);
printf("\n");
printf_line("=", 79);