projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Unbreak the tests.
[open-adventure.git]
/
main.c
diff --git
a/main.c
b/main.c
index fd84ca7894b16961f1e46b5546c679f034dd66ca..31eaf4691e9e68131b9f9530941e7a750204dd65 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-11,6
+11,7
@@
#include <time.h>
#include "advent.h"
#include "database.h"
#include <time.h>
#include "advent.h"
#include "database.h"
+#include "linenoise/linenoise.h"
struct game_t game;
struct game_t game;
@@
-82,6
+83,8
@@
case 'l':
}
}
}
}
+ linenoiseHistorySetMaxLen(350);
+
/* Logical variables:
*
* game.closed says whether we're all the way closed
/* Logical variables:
*
* game.closed says whether we're all the way closed
@@
-659,6
+662,7
@@
static bool do_command(FILE *cmdin)
long KQ, VERB, KK, V1, V2;
long obj, i;
static long IGO = 0;
long KQ, VERB, KK, V1, V2;
long obj, i;
static long IGO = 0;
+ enum speechpart part;
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
/* Can't leave cave once it's closing (except by main office). */
if (OUTSID(game.newloc) && game.newloc != 0 && game.closng) {
@@
-868,11
+872,11
@@
L3000: SETPRM(1,WD1,WD1X);
/* Verb and object analysis moved to separate module. */
/* Verb and object analysis moved to separate module. */
-L4000:
i=4000
; VERB=K; goto Laction;
-L4090:
i=4090
; goto Laction;
-L5000:
i=5000
; obj = K;
+L4000:
part=intransitive
; VERB=K; goto Laction;
+L4090:
part=transitive
; goto Laction;
+L5000:
part=unknown
; obj = K;
Laction:
Laction:
- switch (action(cmdin,
i
, VERB, obj)) {
+ switch (action(cmdin,
part
, VERB, obj)) {
case 2: return true;
case 8: goto L8;
case 2000: goto L2000;
case 2: return true;
case 8: goto L8;
case 2000: goto L2000;