projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Seed command fully implemented but apparently buggy.
[open-adventure.git]
/
actions1.c
diff --git
a/actions1.c
b/actions1.c
index 79c0ea719c497ac138efb711af7b5c68beab3243..0a1155d800c355058c63506e76519b8c2b7f0891 100644
(file)
--- a/
actions1.c
+++ b/
actions1.c
@@
-65,6
+65,7
@@
L4000: VERB=K;
case 31: goto L8320; /* FLY */
case 32: goto L8330; /* LISTEN */
case 33: goto L8340; /* ZZZZ */
case 31: goto L8320; /* FLY */
case 32: goto L8330; /* LISTEN */
case 33: goto L8340; /* ZZZZ */
+ case 34: goto L8350; /* SEED */
}
BUG(23);
}
BUG(23);
@@
-105,6
+106,7
@@
L4090: switch (VERB-1) {
case 31: goto L9320; /* FLY */
case 32: return(2011); /* LISTEN */
case 33: goto L8340; /* ZZZZ */
case 31: goto L9320; /* FLY */
case 32: return(2011); /* LISTEN */
case 33: goto L8340; /* ZZZZ */
+ case 34: goto L8350; /* SEED */
}
BUG(24);
}
BUG(24);
@@
-623,4
+625,14
@@
L8340: if(!AT(RESER) && LOC != FIXED[RESER]-1) return(2011);
RSPEAK(241);
return(2);
RSPEAK(241);
return(2);
+/* Seed. Expected in game logs to replicate the LCG state */
+
+L8350: {
+ long sv;
+ int n;
+ n = sscanf(raw_input, "seed %ld\n", &sv);
+ if (n >= 1)
+ set_seed(sv);
+ return(2);
+ }
}
}