Comment polishing.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 11 Jul 2017 08:15:57 +0000 (04:15 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 11 Jul 2017 08:15:57 +0000 (04:15 -0400)
actions.c
main.c

index 980352f348dc201f3fff5bb87e8db09481f86316..64b5c20aa0f77b3db94e1ce170d80a1e95401637 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -903,7 +903,11 @@ static int listen(void)
             game.prop[i] < 0)
             continue;
         int mi =  game.prop[i];
             game.prop[i] < 0)
             continue;
         int mi =  game.prop[i];
-        /* FIXME: Weird magic on object states */
+        /* (ESR) Some unpleasant magic on object states here. Ideally
+         * we'd have liked the bird to be a normal object that we can
+         * use state_change() on; can't do it, because there are
+         * actually two different series of per-state birdsounds
+         * depending on whether player has drunk dragon's blood. */
         if (i == BIRD)
             mi += 3 * game.blooded;
         long packed_zzword = token_to_packed(game.zzword);
         if (i == BIRD)
             mi += 3 * game.blooded;
         long packed_zzword = token_to_packed(game.zzword);
diff --git a/main.c b/main.c
index 9114621e974e9314aa34cae60707db25a3587c36..10d284500d80ec2cd91d84d5b639a9ac3fb74f84 100644 (file)
--- a/main.c
+++ b/main.c
@@ -246,12 +246,12 @@ static bool spotted_by_pirate(int i)
     if (i != PIRATE)
         return false;
 
     if (i != PIRATE)
         return false;
 
-    /*  The pirate's spotted him.  He leaves him alone once we've
+    /*  The pirate's spotted him.  Pirate leaves him alone once we've
      *  found chest.  K counts if a treasure is here.  If not, and
      *  tally=1 for an unseen chest, let the pirate be spotted.  Note
      *  that game.place[CHEST] = LOC_NOWHERE might mean that he's thrown
      *  it to the troll, but in that case he's seen the chest
      *  found chest.  K counts if a treasure is here.  If not, and
      *  tally=1 for an unseen chest, let the pirate be spotted.  Note
      *  that game.place[CHEST] = LOC_NOWHERE might mean that he's thrown
      *  it to the troll, but in that case he's seen the chest
-     *  (game.prop=0). */
+     *  (game.prop[CHEST] == STATE_FOUND). */
     if (game.loc == game.chloc ||
         game.prop[CHEST] != STATE_NOTFOUND)
         return true;
     if (game.loc == game.chloc ||
         game.prop[CHEST] != STATE_NOTFOUND)
         return true;
@@ -321,15 +321,14 @@ static bool dwarfmove(void)
      *  variables.  Remember sixth dwarf is pirate and is thus
      *  very different except for motion rules. */
 
      *  variables.  Remember sixth dwarf is pirate and is thus
      *  very different except for motion rules. */
 
-    /*  First off, don't let the dwarves follow him into a pit or
-     *  a wall.  Activate the whole mess the first time he gets as
-     *  far as the hall of mists (loc 15).  If game.newloc is
-     *  forbidden to pirate (in particular, if it's beyond the
+    /*  First off, don't let the dwarves follow him into a pit or a
+     *  wall.  Activate the whole mess the first time he gets as far
+     *  as the Hall of Mists (what INDEEP() tests).  If game.newloc
+     *  is forbidden to pirate (in particular, if it's beyond the
      *  troll bridge), bypass dwarf stuff.  That way pirate can't
      *  steal return toll, and dwarves can't meet the bear.  Also
      *  means dwarves won't follow him into dead end in maze, but
      *  troll bridge), bypass dwarf stuff.  That way pirate can't
      *  steal return toll, and dwarves can't meet the bear.  Also
      *  means dwarves won't follow him into dead end in maze, but
-     *  c'est la vie.  They'll wait for him outside the dead
-     *  end. */
+     *  c'est la vie.  They'll wait for him outside the dead end. */
     if (game.loc == LOC_NOWHERE ||
         FORCED(game.loc) ||
         CNDBIT(game.newloc, COND_NOARRR))
     if (game.loc == LOC_NOWHERE ||
         FORCED(game.loc) ||
         CNDBIT(game.newloc, COND_NOARRR))
@@ -343,7 +342,7 @@ static bool dwarfmove(void)
     }
 
     /*  When we encounter the first dwarf, we kill 0, 1, or 2 of
     }
 
     /*  When we encounter the first dwarf, we kill 0, 1, or 2 of
-     *  the 5 dwarves.  If any of the survivors is at loc,
+     *  the 5 dwarves.  If any of the survivors is at game.loc,
      *  replace him with the alternate. */
     if (game.dflag == 1) {
         if (!INDEEP(game.loc) ||
      *  replace him with the alternate. */
     if (game.dflag == 1) {
         if (!INDEEP(game.loc) ||
@@ -644,7 +643,6 @@ static void playermove( int motion)
     /* (ESR) We've found a destination that goes with the motion verb.
      * Next we need to check any conditional(s) on this destination, and
      * possibly on following entries. */
     /* (ESR) We've found a destination that goes with the motion verb.
      * Next we need to check any conditional(s) on this destination, and
      * possibly on following entries. */
-    /* FIXME: Magic numbers related to move opcodes */
     do {
         for (;;) { /* L12 loop */
             for (;;) {
     do {
         for (;;) { /* L12 loop */
             for (;;) {