Inform - Support - Patches

About Patches  

Compiler  
Library  

DM4 Errata  

Issue L61002

Strange spacing on inside_description
Submitted by: Daniel Schepler     Appeared in: Library 6/10     Fixed in: Library 6/11
Problem

I just noticed that if a player is inside a closed, nontransparent container, the library prints an extra blank line between the header 'The container' and the first inside_description line it prints.

Solution

My fix was to apply the following changes to the LookSub() routine, which keeps track of whether it's gotten past the first such description. (The patch is against the stock 6/10 library, serial 991113.)

--- verblibm.h~ Sat Nov 13 11:29:14 1999
+++ verblibm.h  Sun Nov 28 01:32:33 1999
@@ -1568,7 +1568,7 @@
   return visibility_levels;
 ];

-[ LookSub allow_abbrev  visibility_levels i j k;
+[ LookSub allow_abbrev  visibility_levels i j k nl_flag;
   if (parent(player)==0) return RunTimeError(10);

   .MovedByInitial;
@@ -1612,6 +1612,8 @@
       }
   }

+  if (visibility_ceiling==location) nl_flag = 1;
+
   if (visibility_levels == 0) Locale(thedark);
   else
   {   for (i=player, j=visibility_levels: j>0: j--, i=parent(i))
@@ -1620,8 +1622,9 @@
       for (j=visibility_levels: j>0: j--)
       {   for (i=player, k=0: k < j: k++) i=parent(i);
           if (i.inside_description~=0)
-          {   new_line; PrintOrRun(i,inside_description); }
-          Locale(i);
+          {   if (nl_flag) new_line; else nl_flag = 1;
+              PrintOrRun(i,inside_description); }
+          if (Locale(i)~=0) nl_flag=1;
       }
   }


Last updated 17 April 2013. This site is no longer supported; information may be out of date.
Maintained as a historical archive by the Interactive Fiction Technology Foundation. Copyright 1993-2018 IFTF, CC-BY-SA unless otherwise noted.
This page was originally managed by Roger Firth.