projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Comment cleanup, semantic types, information hiding.
[open-adventure.git]
/
main.c
diff --git
a/main.c
b/main.c
index a42fe3e235682752dd6db009298dadb94635c2d2..faa353b514be4001c04d0506170d0e660fbc47ef 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-137,6
+137,7
@@
static bool fallback_handler(struct command_t command)
/* fallback handler for commands not handled by FORTRANish parser */
{
long sv;
/* fallback handler for commands not handled by FORTRANish parser */
{
long sv;
+ turn_t turnlimit;
char buf[DIM(command.raw1) + DIM(command.raw2) + 1];
sprintf(buf, "%s %s", command.raw1, command.raw2);
char buf[DIM(command.raw1) + DIM(command.raw2) + 1];
sprintf(buf, "%s %s", command.raw1, command.raw2);
@@
-146,8
+147,8
@@
static bool fallback_handler(struct command_t command)
// autogenerated, so don't charge user time for it.
--game.turns;
return true;
// autogenerated, so don't charge user time for it.
--game.turns;
return true;
- } else if (sscanf(buf, "waste %ld", &
sv
) == 1) {
- game.limit -=
sv
;
+ } else if (sscanf(buf, "waste %ld", &
turnlimit
) == 1) {
+ game.limit -=
turnlimit
;
printf("Game limit is now %ld\n", game.limit);
return true;
}
printf("Game limit is now %ld\n", game.limit);
return true;
}
@@
-670,7
+671,7
@@
static void playermove( int motion)
/* We arrive here on conditional failure.
* Skip to next non-matching destination */
/* We arrive here on conditional failure.
* Skip to next non-matching destination */
-
long
te_tmp = travel_entry;
+
int
te_tmp = travel_entry;
do {
if (travel[te_tmp].stop)
BUG(CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION); // LCOV_EXCL_LINE
do {
if (travel[te_tmp].stop)
BUG(CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION); // LCOV_EXCL_LINE