projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Spelling fixes
[open-adventure.git]
/
misc.c
diff --git
a/misc.c
b/misc.c
index 0bcfb26387b7edb2487d636c2991ca40c6fabc93..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);
@@
-602,7
+602,7
@@
loc_t put(obj_t object, loc_t where, int pval)
* negated game.prop values for the repository objects. */
{
move(object, where);
* negated game.prop values for the repository objects. */
{
move(object, where);
- return (-1) - pval;;
+ return (-1) - pval;;
// Needs to stay sinchronized with STASHED
}
void carry(obj_t object, loc_t where)
}
void carry(obj_t object, loc_t where)
@@
-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;
}