projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Start building a better test load for micwords.
[open-adventure.git]
/
misc.c
diff --git
a/misc.c
b/misc.c
index 691d771eec7ab79d1d0a399c529a5af02f1a8d36..c2512cb0ac5a5b78493142f966ed9b653a94d9be 100644
(file)
--- a/
misc.c
+++ b/
misc.c
@@
-221,7
+221,7
@@
static char* get_input(void)
// Print a blank line
printf("\n");
// Print a blank line
printf("\n");
- char* input
= ""
;
+ char* input;
for (;;) {
input = myreadline(input_prompt);
for (;;) {
input = myreadline(input_prompt);
@@
-699,7
+699,7
@@
bool tstbit(int mask, int bit)
}
void set_seed(int32_t seedval)
}
void set_seed(int32_t seedval)
-/* Set the LCG seed */
+/* Set the LCG
1
seed */
{
game.lcg_x = seedval % LCG_M;
if (game.lcg_x < 0) {
{
game.lcg_x = seedval % LCG_M;
if (game.lcg_x < 0) {
@@
-718,6
+718,9
@@
static int32_t get_next_lcg_value(void)
{
int32_t old_x = game.lcg_x;
game.lcg_x = (LCG_A * game.lcg_x + LCG_C) % LCG_M;
{
int32_t old_x = game.lcg_x;
game.lcg_x = (LCG_A * game.lcg_x + LCG_C) % LCG_M;
+ if (settings.debug) {
+ printf("# random %d\n", old_x); // LCOV_EXCL_LINE
+ }
return old_x;
}
return old_x;
}