NextEntry (lines 90-128)
Back to List
Browsing verblibm.h
0090 ! The WriteListFrom routine, a flexible object-lister taking care of
0091 ! plurals, inventory information, various formats and so on. This is used
0092 ! by everything in the library which ever wants to list anything.
0093 !
0094 ! If there were no objects to list, it prints nothing and returns false;
0095 ! otherwise it returns true.
0096 !
0097 ! o is the object, and style is a bitmap, whose bits are given by:
0098 ! ----------------------------------------------------------------------------
0099
0100 Constant NEWLINE_BIT 1; ! New-line after each entry
0101 Constant INDENT_BIT 2; ! Indent each entry by depth
0102 Constant FULLINV_BIT 4; ! Full inventory information after entry
0103 Constant ENGLISH_BIT 8; ! English sentence style, with commas and and
0104 Constant RECURSE_BIT 16; ! Recurse downwards with usual rules
0105 Constant ALWAYS_BIT 32; ! Always recurse downwards
0106 Constant TERSE_BIT 64; ! More terse English style
0107 Constant PARTINV_BIT 128; ! Only brief inventory information after entry
0108 Constant DEFART_BIT 256; ! Use the definite article in list
0109 Constant WORKFLAG_BIT 512; ! At top level (only), only list objects
0110 ! which have the "workflag" attribute
0111 Constant ISARE_BIT 1024; ! Print " is" or " are" before list
0112 Constant CONCEAL_BIT 2048; ! Omit objects with "concealed" or "scenery":
0113 ! if WORKFLAG_BIT also set, then does _not_
0114 ! apply at top level, but does lower down
0115 Constant NOARTICLE_BIT 4096; ! Print no articles, definite or not
0116
0117 [ NextEntry o odepth;
0118 for(::)
0119 { o=sibling(o);
0120 if (o==0) return 0;
0121 if (lt_value ~=0 && o.list_together~=lt_value) continue;
0122 if (c_style & WORKFLAG_BIT ~= 0 && odepth==0 && o hasnt workflag)
0123 continue;
0124 if (c_style & CONCEAL_BIT ~= 0 && (o has concealed || o has scenery))
0125 continue;
0126 return o;
0127 }
0128 ];
Last updated 27 February 2004.
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 Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.