projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Simplify seed and waste cpmands using %d in the YAML string.
[open-adventure.git]
/
actions.c
diff --git
a/actions.c
b/actions.c
index 0a67cf43c6866ee88fee11ee0443934ef8f74428..7faf3313e25fb5b5f53ad0efb849e331d12605f9 100644
(file)
--- a/
actions.c
+++ b/
actions.c
@@
-1247,8
+1247,8
@@
static int wake(verb_t verb, obj_t obj)
static int seed(verb_t verb, const char *arg)
/* Set seed */
{
static int seed(verb_t verb, const char *arg)
/* Set seed */
{
-
long seed = atol
(arg);
- speak(actions[verb].message,
arg
);
+
int seed = atoi
(arg);
+ speak(actions[verb].message,
seed
);
set_seed(seed);
--game.turns;
return GO_TOP;
set_seed(seed);
--game.turns;
return GO_TOP;
@@
-1258,9
+1258,7
@@
static int waste(verb_t verb, turn_t turns)
/* Burn turns */
{
game.limit -= turns;
/* Burn turns */
{
game.limit -= turns;
- char newlim[1024];
- sprintf(newlim, "%ld", (long)game.limit);
- speak(actions[verb].message, newlim);
+ speak(actions[verb].message, (int)game.limit);
return GO_TOP;
}
return GO_TOP;
}