X-Git-Url: https://jxself.org/git/?a=blobdiff_plain;ds=sidebyside;f=main.c;h=c27ac1ce1935350f84856a5c8b74dc77ad7d3a5b;hb=42a42c49ac16602933344d5c1f6236cb9683afd4;hp=e8625b2978c4529aa945b05a3d5de977a2d5f20b;hpb=0590c080eec764cc8d50e8c8875a4ecd9ff76ff9;p=open-adventure.git diff --git a/main.c b/main.c index e8625b2..c27ac1c 100644 --- a/main.c +++ b/main.c @@ -465,7 +465,7 @@ static void croak(void) /* Okay, he's dead. Let's get on with it. */ { if (game.numdie < 0) - game.numdie = 0; + game.numdie = 0; // LCOV_EXCL_LINE const char* query = obituaries[game.numdie].query; const char* yes_response = obituaries[game.numdie].yes_response; ++game.numdie; @@ -1037,11 +1037,11 @@ static bool do_command() listobjects(); Lclearobj: - command.verb = 0; + command.verb = ACT_NULL; game.oldobj = command.obj; - command.obj = 0; + command.obj = NO_OBJECT; -L2600: +Lcheckhint: checkhints(); /* If closing time, check for any objects being toted with @@ -1177,7 +1177,7 @@ Lookup: command.part = intransitive; command.verb = command.word[0].id; break; - case NUMERIC: // LCOV_EXCL_LINE + case NUMERIC: if (!settings.oldstyle) { sspeak(DONT_KNOW, command.word[0].raw); goto Lclearobj; @@ -1185,9 +1185,6 @@ Lookup: default: // LCOV_EXCL_LINE BUG(VOCABULARY_TYPE_N_OVER_1000_NOT_BETWEEN_0_AND_3); // LCOV_EXCL_LINE } - if (!is_valid(game)) { - exit(1); - } switch (action(command)) { case GO_TERMINATE: return true; @@ -1199,11 +1196,7 @@ Lookup: case GO_CLEAROBJ: goto Lclearobj; case GO_CHECKHINT: - goto L2600; - case GO_CHECKFOO: - goto Lclosecheck; - case GO_LOOKUP: - goto Lookup; + goto Lcheckhint; case GO_WORD2: #ifdef GDEBUG printf("Word shift\n"); @@ -1218,7 +1211,7 @@ Lookup: command.word[0].raw[0] = toupper(command.word[0].raw[0]); sspeak(DO_WHAT, command.word[0].raw); command.obj = 0; - goto L2600; + goto Lcheckhint; case GO_DWARFWAKE: /* Oh dear, he's disturbed the dwarves. */ rspeak(DWARVES_AWAKEN);