diff --git a/README.md b/README.md index 0be5ea2b6..f6445f9ad 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Inform 7 -v10.1.0-alpha.1+6S74 'Krypton' (18 July 2021) +v10.1.0-alpha.1+6S75 'Krypton' (19 July 2021) ## About Inform 7 diff --git a/build.txt b/build.txt index 8cc69155e..b0141b576 100644 --- a/build.txt +++ b/build.txt @@ -1,3 +1,3 @@ Prerelease: alpha.1 -Build Date: 18 July 2021 -Build Number: 6S74 +Build Date: 19 July 2021 +Build Number: 6S75 diff --git a/docs/index-module/2-fi.html b/docs/index-module/2-fi.html index ad9de61c8..6586777dd 100644 --- a/docs/index-module/2-fi.html +++ b/docs/index-module/2-fi.html @@ -72,7 +72,7 @@ function togglePopup(material_id) {

Some of the more complicated indexing tasks need to build data structures cross-referencing the instance packages in the Inter tree: the spatial map, in particular. For convenience, we create faux-instance objects for them, which partly correspond to the instance objects in the original compiler.

-
+

§1. The data structure faux_instance consists mostly of cross-references to other faux instances, and is paraphrased directly from the Inter tree: @@ -111,33 +111,33 @@ created.

-faux_instance *FauxInstances::new(inter_package *pack) {
-    faux_instance *FI = CREATE(faux_instance);
-    FI->index_appearances = 0;
-    FI->package = pack;
-    FI->name = Str::duplicate(Metadata::read_textual(pack, I"^name"));
-    FI->printed_name = Str::duplicate(Metadata::read_textual(pack, I"^printed_name"));
-    FI->abbrev = Str::duplicate(Metadata::read_textual(pack, I"^abbreviation"));
-    FI->kind_text = Str::duplicate(Metadata::read_textual(pack, I"^index_kind"));
-    FI->kind_chain = Str::duplicate(Metadata::read_textual(pack, I"^index_kind_chain"));
-    FI->other_side = NULL;
-    FI->direction_index = -1;
+faux_instance *FauxInstances::new(inter_package *pack) {
+    faux_instance *I = CREATE(faux_instance);
+    I->index_appearances = 0;
+    I->package = pack;
+    I->name = Str::duplicate(Metadata::read_textual(pack, I"^name"));
+    I->printed_name = Str::duplicate(Metadata::read_textual(pack, I"^printed_name"));
+    I->abbrev = Str::duplicate(Metadata::read_textual(pack, I"^abbreviation"));
+    I->kind_text = Str::duplicate(Metadata::read_textual(pack, I"^index_kind"));
+    I->kind_chain = Str::duplicate(Metadata::read_textual(pack, I"^index_kind_chain"));
+    I->other_side = NULL;
+    I->direction_index = -1;
 
-    FI->backdrop_presences = NEW_LINKED_LIST(faux_instance);
-    FI->region_enclosing = NULL;
-    FI->next_room_in_submap = NULL;
-    FI->opposite_direction = NULL;
-    FI->object_tree_sibling = NULL;
-    FI->object_tree_child = NULL;
-    FI->progenitor = NULL;
-    FI->incorp_tree_sibling = NULL;
-    FI->incorp_tree_child = NULL;
+    I->backdrop_presences = NEW_LINKED_LIST(faux_instance);
+    I->region_enclosing = NULL;
+    I->next_room_in_submap = NULL;
+    I->opposite_direction = NULL;
+    I->object_tree_sibling = NULL;
+    I->object_tree_child = NULL;
+    I->progenitor = NULL;
+    I->incorp_tree_sibling = NULL;
+    I->incorp_tree_child = NULL;
 
-    FI->anchor_text = Str::new();
-    WRITE_TO(FI->anchor_text, "fi%d", FI->allocation_id);
+    I->anchor_text = Str::new();
+    WRITE_TO(I->anchor_text, "fi%d", I->allocation_id);
 
-    FI->fimd = FauxInstances::new_fimd(FI);
-    return FI;
+    I->fimd = FauxInstances::new_fimd(I);
+    return I;
 }
 

§3. Though the FI structure mostly paraphrases data in the Inter tree which in @@ -174,7 +174,7 @@ the World map.

-fi_map_data FauxInstances::new_fimd(faux_instance *FI) {
+fi_map_data FauxInstances::new_fimd(faux_instance *I) {
     fi_map_data fimd;
     fimd.submap = NULL;
     fimd.position = Geometry::zero();
@@ -199,7 +199,9 @@ the World map.
     return fimd;
 }
 
-

§5.

+

§5. Sets. Since we might want to index multiple different Inter trees in the same run, +we may need to keep multiple sets of faux instances, one for each tree. So: +

 typedef struct faux_instance_set {
@@ -209,35 +211,15 @@ the World map.
     struct faux_instance *start_faux_instance;
     struct faux_instance *faux_yourself;
     struct faux_instance *faux_benchmark;
+    struct linked_list *rubrics;  of rubric_holder
     CLASS_DEFINITION
 } faux_instance_set;
 
- -

§6. Iterating over faux instances in a set: -

- -
define LOOP_OVER_FAUX_INSTANCES(faux_set, R)
-    LOOP_OVER_LINKED_LIST(R, faux_instance, faux_set->instances)
-define LOOP_OVER_FAUX_ROOMS(faux_set, R)
-    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
-        if (FauxInstances::is_a_room(R))
-define LOOP_OVER_FAUX_DOORS(faux_set, R)
-    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
-        if (FauxInstances::is_a_door(R))
-define LOOP_OVER_FAUX_REGIONS(faux_set, R)
-    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
-        if (FauxInstances::is_a_region(R))
-define LOOP_OVER_FAUX_DIRECTIONS(faux_set, R)
-    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
-        if (FauxInstances::is_a_direction(R))
-define LOOP_OVER_FAUX_BACKDROPS(faux_set, R)
-    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
-        if (FauxInstances::is_a_backdrop(R))
-
-

§7.

+ +

§6.

-faux_instance_set *FauxInstances::make_faux(inter_tree *IT) {
+faux_instance_set *FauxInstances::new_empty_set(void) {
     faux_instance_set *faux_set = CREATE(faux_instance_set);
     faux_set->no_direction_fi = 0;
     faux_set->no_room_fi = 0;
@@ -245,83 +227,183 @@ the World map.
     faux_set->start_faux_instance = NULL;
     faux_set->faux_yourself = NULL;
     faux_set->faux_benchmark = NULL;
+    faux_set->rubrics = NEW_LINKED_LIST(rubric_holder);
+    return faux_set;
+}
+
+

§7. Iterating over faux instances in a set can then be done thus: +

+ +
define LOOP_OVER_FAUX_INSTANCES(faux_set, R)
+    LOOP_OVER_LINKED_LIST(R, faux_instance, faux_set->instances)
+define LOOP_OVER_FAUX_ROOMS(faux_set, R)
+    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
+        if (FauxInstances::is_a_room(R))
+define LOOP_OVER_FAUX_DOORS(faux_set, R)
+    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
+        if (FauxInstances::is_a_door(R))
+define LOOP_OVER_FAUX_REGIONS(faux_set, R)
+    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
+        if (FauxInstances::is_a_region(R))
+define LOOP_OVER_FAUX_DIRECTIONS(faux_set, R)
+    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
+        if (FauxInstances::is_a_direction(R))
+define LOOP_OVER_FAUX_BACKDROPS(faux_set, R)
+    LOOP_OVER_FAUX_INSTANCES(faux_set, R)
+        if (FauxInstances::is_a_backdrop(R))
+
+

§8. And here is the code to make a fully cross-referenced set from a given tree: +

+ +
+faux_instance_set *FauxInstances::make_faux(inter_tree *IT) {
+    faux_instance_set *faux_set = FauxInstances::new_empty_set();
 
     tree_inventory *inv = Synoptic::inv(IT);
     TreeLists::sort(inv->instance_nodes, Synoptic::module_order);
     for (int i=0; i<TreeLists::len(inv->instance_nodes); i++) {
         inter_package *pack = Inter::Package::defined_by_frame(inv->instance_nodes->list[i].node);
         if (Metadata::read_optional_numeric(pack,  I"^is_object") == 0) continue;
-        faux_instance *FI = FauxInstances::new(pack);
-        ADD_TO_LINKED_LIST(FI, faux_instance, faux_set->instances);
-        if (FauxInstances::is_a_direction(FI)) FI->direction_index = faux_set->no_direction_fi++;
-        if (FauxInstances::is_a_room(FI)) faux_set->no_room_fi++;
-        if (Metadata::read_optional_numeric(pack, I"^is_yourself")) faux_set->faux_yourself = FI;
-        if (Metadata::read_optional_numeric(pack, I"^is_benchmark_room")) faux_set->faux_benchmark = FI;
-        if (Metadata::read_optional_numeric(pack, I"^is_start_room")) faux_set->start_faux_instance = FI;
+        Add a faux instance to the set for this object-instance package8.1;
     }
-    faux_instance *FI;
-    LOOP_OVER_FAUX_ROOMS(faux_set, FI) {
-        inter_package *pack = FI->package;
-        inter_tree_node *P = Metadata::read_optional_list(pack, I"^map");
-        if (P) {
-            for (int i=0; i<MAX_DIRECTIONS; i++) {
-                int offset = DATA_CONST_IFLD + 4*i;
-                if (offset >= P->W.extent) break;
-                inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
-                if (v1 == ALIAS_IVAL) {
-                    inter_symbol *s = InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
-                    if (s == NULL) internal_error("malformed map metadata");
-                    FI->fimd.exits[i] = FauxInstances::fis(faux_set, s);
-                } else if ((v1 != LITERAL_IVAL) || (v2 != 0)) internal_error("malformed map metadata");
-                inter_ti v3 = P->W.data[offset+2], v4 = P->W.data[offset+3];
-                if (v3 != LITERAL_IVAL) internal_error("malformed map metadata");
-                if (v4) FI->fimd.exits_set_at[i] = (int) v4;
-            }
-        }
-    }
-    LOOP_OVER_FAUX_BACKDROPS(faux_set, FI) {
-        inter_package *pack = FI->package;
-        inter_tree_node *P = Metadata::read_optional_list(pack, I"^backdrop_presences");
-        if (P) {
-            int offset = DATA_CONST_IFLD;
-            while (offset < P->W.extent) {
-                inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
-                if (v1 == ALIAS_IVAL) {
-                    inter_symbol *s = InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
-                    if (s == NULL) internal_error("malformed map metadata");
-                    faux_instance *FL = FauxInstances::fis(faux_set, s);
-                    ADD_TO_LINKED_LIST(FI, faux_instance, FL->backdrop_presences);
-                } else internal_error("malformed backdrop metadata");
-                offset += 2;
-            }
-        }
+    faux_instance *I;
+    LOOP_OVER_FAUX_INSTANCES(faux_set, I) {
+        inter_package *pack = I->package;
+        Cross-reference spatial relationships8.2;
+        if (FauxInstances::is_a_room(I)) Cross-reference map relationships8.3;
+        if (FauxInstances::is_a_backdrop(I)) Cross-reference backdrop locations8.4;
+        if (FauxInstances::is_a_direction(I)) Cross-reference diametric directions8.5;
+        if (FauxInstances::is_a_door(I)) Cross-reference door adjacencies8.6;
     }
 
-    LOOP_OVER_FAUX_INSTANCES(faux_set, FI) {
-        FI->region_enclosing = FauxInstances::instance_metadata(faux_set, FI, I"^region_enclosing");
-        FI->object_tree_sibling = FauxInstances::instance_metadata(faux_set, FI, I"^sibling");
-        FI->object_tree_child = FauxInstances::instance_metadata(faux_set, FI, I"^child");
-        FI->progenitor = FauxInstances::instance_metadata(faux_set, FI, I"^progenitor");
-        FI->incorp_tree_sibling = FauxInstances::instance_metadata(faux_set, FI, I"^incorp_sibling");
-        FI->incorp_tree_child = FauxInstances::instance_metadata(faux_set, FI, I"^incorp_child");
-    }
-    faux_instance *FR;
-    LOOP_OVER_FAUX_DIRECTIONS(faux_set, FR)
-        FR->opposite_direction = FauxInstances::instance_metadata(faux_set, FR, I"^opposite_direction");
-    faux_instance *FD;
-    LOOP_OVER_FAUX_DOORS(faux_set, FD) {
-        FD->other_side = FauxInstances::instance_metadata(faux_set, FD, I"^other_side");
-        FD->fimd.map_connection_a = FauxInstances::instance_metadata(faux_set, FD, I"^side_a");
-        FD->fimd.map_connection_b = FauxInstances::instance_metadata(faux_set, FD, I"^side_b");
-    }
-    FauxInstances::decode_hints(faux_set, IT, 1);
+    FauxInstances::decode_hints(faux_set, IT, 1);
     return faux_set;
 }
 
-

§8.

+

§8.1. Add a faux instance to the set for this object-instance package8.1 = +

-void FauxInstances::decode_hints(faux_instance_set *faux_set, inter_tree *I, int pass) {
+    faux_instance *I = FauxInstances::new(pack);
+    ADD_TO_LINKED_LIST(I, faux_instance, faux_set->instances);
+    if (FauxInstances::is_a_direction(I)) I->direction_index = faux_set->no_direction_fi++;
+    if (FauxInstances::is_a_room(I)) faux_set->no_room_fi++;
+    if (Metadata::read_optional_numeric(pack, I"^is_yourself")) faux_set->faux_yourself = I;
+    if (Metadata::read_optional_numeric(pack, I"^is_benchmark_room")) faux_set->faux_benchmark = I;
+    if (Metadata::read_optional_numeric(pack, I"^is_start_room")) faux_set->start_faux_instance = I;
+
+ +

§8.2. Cross-reference spatial relationships8.2 = +

+ +
+    I->region_enclosing = FauxInstances::xref(faux_set, I->package, I"^region_enclosing");
+    I->object_tree_sibling = FauxInstances::xref(faux_set, I->package, I"^sibling");
+    I->object_tree_child = FauxInstances::xref(faux_set, I->package, I"^child");
+    I->progenitor = FauxInstances::xref(faux_set, I->package, I"^progenitor");
+    I->incorp_tree_sibling = FauxInstances::xref(faux_set, I->package, I"^incorp_sibling");
+    I->incorp_tree_child = FauxInstances::xref(faux_set, I->package, I"^incorp_child");
+
+ +

§8.3. Cross-reference map relationships8.3 = +

+ +
+    inter_tree_node *P = Metadata::read_optional_list(pack, I"^map");
+    if (P) {
+        for (int i=0; i<MAX_DIRECTIONS; i++) {
+            int offset = DATA_CONST_IFLD + 4*i;
+            if (offset >= P->W.extent) break;
+            inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
+            if (v1 == ALIAS_IVAL) {
+                inter_symbol *S =
+                    InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
+                if (S == NULL) internal_error("malformed map metadata");
+                I->fimd.exits[i] = FauxInstances::symbol_to_faux_instance(faux_set, S);
+            } else if ((v1 != LITERAL_IVAL) || (v2 != 0)) internal_error("malformed map metadata");
+            inter_ti v3 = P->W.data[offset+2], v4 = P->W.data[offset+3];
+            if (v3 != LITERAL_IVAL) internal_error("malformed map metadata");
+            if (v4) I->fimd.exits_set_at[i] = (int) v4;
+        }
+    }
+
+ +

§8.4. Cross-reference backdrop locations8.4 = +

+ +
+    inter_tree_node *P = Metadata::read_optional_list(pack, I"^backdrop_presences");
+    if (P) {
+        int offset = DATA_CONST_IFLD;
+        while (offset < P->W.extent) {
+            inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
+            if (v1 == ALIAS_IVAL) {
+                inter_symbol *S =
+                    InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
+                if (S == NULL) internal_error("malformed map metadata");
+                faux_instance *FL = FauxInstances::symbol_to_faux_instance(faux_set, S);
+                ADD_TO_LINKED_LIST(I, faux_instance, FL->backdrop_presences);
+            } else internal_error("malformed backdrop metadata");
+            offset += 2;
+        }
+    }
+
+ +

§8.5. Cross-reference diametric directions8.5 = +

+ +
+    I->opposite_direction = FauxInstances::xref(faux_set, I->package, I"^opposite_direction");
+
+ +

§8.6. Cross-reference door adjacencies8.6 = +

+ +
+    I->other_side = FauxInstances::xref(faux_set, I->package, I"^other_side");
+    I->fimd.map_connection_a = FauxInstances::xref(faux_set, I->package, I"^side_a");
+    I->fimd.map_connection_b = FauxInstances::xref(faux_set, I->package, I"^side_b");
+
+ +

§9. When the Inter package for one instance wants to refer to another one, say +with the key other, it does so by having a symbol other defined as the +instance value of the other instance: so we first extract the symbol by looking +key up in the first instance's package; then we can find the other instance +package simply by finding the container-package for where S is defined. +It is then a simple if not especially quick task to find which faux_instance +was made from that package. +

+ +
+faux_instance *FauxInstances::xref(faux_instance_set *faux_set, inter_package *pack,
+    text_stream *key) {
+    return FauxInstances::symbol_to_faux_instance(faux_set,
+        Metadata::read_optional_symbol(pack, key));
+}
+
+faux_instance *FauxInstances::symbol_to_faux_instance(faux_instance_set *faux_set,
+    inter_symbol *S) {
+    if (S == NULL) return NULL;
+    inter_package *want = Inter::Packages::container(S->definition);
+    faux_instance *I;
+    LOOP_OVER_FAUX_INSTANCES(faux_set, I)
+        if (I->package == want)
+            return I;
+    return NULL;
+}
+
+

§10. Decoding map hints. Mapping hints arise from sentences like "Index with X mapped east of Y", or +some other helpful tip: these are compiled fairly directly into Inter packages, +and this is where we decode those packages and make use of them. +

+ +

This is done in two passes. pass 1 occurs when a new faux set of instances is +being made; pass 2 only after the spatial grid layout has been calculated, +and only if needed. +

+ +
+void FauxInstances::decode_hints(faux_instance_set *faux_set, inter_tree *I, int pass) {
     inter_package *pack = Inter::Packages::by_url(I, I"/main/completion/mapping_hints");
     inter_symbol *wanted = PackageTypes::get(I, I"_mapping_hint");
     inter_tree_node *D = Inter::Packages::definition(pack);
@@ -329,39 +411,28 @@ the World map.
         if (C->W.data[ID_IFLD] == PACKAGE_IST) {
             inter_package *entry = Inter::Package::defined_by_frame(C);
             if (Inter::Packages::type(entry) == wanted) {
-                faux_instance *from = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^from"));
-                faux_instance *to = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^to"));
-                faux_instance *dir = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^dir"));
-                faux_instance *as_dir = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^as_dir"));
+                faux_instance *from = FauxInstances::xref(faux_set, entry, I"^from");
+                faux_instance *to = FauxInstances::xref(faux_set, entry, I"^to");
+                faux_instance *dir = FauxInstances::xref(faux_set, entry, I"^dir");
+                faux_instance *as_dir = FauxInstances::xref(faux_set, entry, I"^as_dir");
                 if ((dir) && (as_dir)) {
-                    if (pass == 1)
-                        story_dir_to_page_dir[dir->direction_index] = as_dir->direction_index;
+                    if (pass == 1) Decode a hint mapping one direction as if another10.1;
                     continue;
                 }
                 if ((from) && (dir)) {
-                    if (pass == 1)
-                        PL::SpatialMap::lock_exit_in_place(from, dir->direction_index, to);
+                    if (pass == 1) Decode a hint mapping one room in a specific direction from another10.2;
                     continue;
                 }
                 text_stream *name = Metadata::read_optional_textual(entry, I"^name");
                 if (Str::len(name) > 0) {
                     int scope_level = (int) Metadata::read_optional_numeric(entry, I"^scope_level");
-                    faux_instance *scope_I = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^scope_instance"));
+                    faux_instance *scope_I = FauxInstances::xref(faux_set, entry, I"^scope_instance");
                     text_stream *text_val = Metadata::read_optional_textual(entry, I"^text");
                     int int_val = (int) Metadata::read_optional_numeric(entry, I"^number");
                     if (scope_level != 1000000) {
-                        if (pass == 2) {
-                            map_parameter_scope *scope = NULL;
-                            EPS_map_level *eml;
-                            LOOP_OVER(eml, EPS_map_level)
-                                if ((eml->contains_rooms)
-                                    && (eml->map_level - PL::SpatialMap::benchmark_level() == scope_level))
-                                    scope = &(eml->map_parameters);
-                            if (scope) ConfigureIndexMap::put_mp(name, scope, scope_I, text_val, int_val);
-                        }
+                        if (pass == 2) Decode a hint setting EPS map parameters relating to levels10.4;
                     } else {
-                        if (pass == 1)
-                            ConfigureIndexMap::put_mp(name, NULL, scope_I, text_val, int_val);
+                        if (pass == 1) Decode a hint setting EPS map parameters10.3;
                     }
                     continue;
                 }
@@ -374,7 +445,8 @@ the World map.
                         rh->font = Metadata::read_optional_textual(entry, I"^font");
                         rh->colour = Metadata::read_optional_textual(entry, I"^colour");
                         rh->at_offset = (int) Metadata::read_optional_numeric(entry, I"^offset");
-                        rh->offset_from = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^offset_from"));
+                        rh->offset_from = FauxInstances::xref(faux_set, entry, I"^offset_from");
+                        ADD_TO_LINKED_LIST(rh, rubric_holder, faux_set->rubrics);
                     }
                     continue;
                 }
@@ -382,225 +454,260 @@ the World map.
         }
     }
 }
+
+

§10.1. For instance, for "starboard" to be mapped as if "east": +

-faux_instance *FauxInstances::instance_metadata(faux_instance_set *faux_set, - faux_instance *I, text_stream *key) { - if (I == NULL) return I; - inter_symbol *val_s = Metadata::read_optional_symbol(I->package, key); - return FauxInstances::fis(faux_set, val_s); -} +

Decode a hint mapping one direction as if another10.1 = +

-faux_instance *FauxInstances::fis(faux_instance_set *faux_set, inter_symbol *S) { - if (S == NULL) return NULL; - inter_package *want = Inter::Packages::container(S->definition); - faux_instance *FI; - LOOP_OVER_FAUX_INSTANCES(faux_set, FI) - if (FI->package == want) - return FI; - return NULL; -} +
+    story_dir_to_page_dir[dir->direction_index] = as_dir->direction_index;
+
+ +

§10.2. For instance, for the East Room to be mapped east of the Grand Lobby: +

-faux_instance *FauxInstances::start_room(void) { +

Decode a hint mapping one room in a specific direction from another10.2 = +

+ +
+    PL::SpatialMap::lock_exit_in_place(from, dir->direction_index, to);
+
+ +

§10.3. Most map parameters (e.g. setting room colours or font sizes) can be set +immediately, i.e., on pass 1: +

+ +

Decode a hint setting EPS map parameters10.3 = +

+ +
+    ConfigureIndexMap::put_mp(name, NULL, scope_I, text_val, int_val);
+
+ +

§10.4. ...but not those hints applying to a specific level of the map (e.g., level 4), +since we do not initially know what level any given room actually lives on: that +can only be known once the spatial grid has been found, i.e., on pass 2. +

+ +

Decode a hint setting EPS map parameters relating to levels10.4 = +

+ +
+    map_parameter_scope *scope = NULL;
+    EPS_map_level *eml;
+    LOOP_OVER(eml, EPS_map_level)
+        if ((eml->contains_rooms)
+            && (eml->map_level - PL::SpatialMap::benchmark_level() == scope_level))
+            scope = &(eml->map_parameters);
+    if (scope) ConfigureIndexMap::put_mp(name, scope, scope_I, text_val, int_val);
+
+ +

§11. Instance set properties.

+ +
+faux_instance *FauxInstances::start_room(void) {
     faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
     return faux_set->start_faux_instance;
 }
 
-faux_instance *FauxInstances::yourself(void) {
+faux_instance *FauxInstances::yourself(void) {
     faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
     return faux_set->faux_yourself;
 }
 
-faux_instance *FauxInstances::benchmark(void) {
+faux_instance *FauxInstances::benchmark(void) {
     faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
     return faux_set->faux_benchmark;
 }
 
-

§9.

+

§12.

-
-int FauxInstances::no_directions(void) {
+int FauxInstances::no_directions(void) {
     faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
     return faux_set->no_direction_fi;
 }
 
-int FauxInstances::no_rooms(void) {
+int FauxInstances::no_rooms(void) {
     faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
     return faux_set->no_room_fi;
 }
 
-

§10. Naming.

+

§13. Individual instance properties.

-text_stream *FauxInstances::get_name(faux_instance *I) {
+text_stream *FauxInstances::get_name(faux_instance *I) {
     if (I == NULL) return NULL;
     return I->name;
 }
 
-void FauxInstances::write_name(OUTPUT_STREAM, faux_instance *I) {
-    WRITE("%S", FauxInstances::get_name(I));
+void FauxInstances::write_name(OUTPUT_STREAM, faux_instance *I) {
+    WRITE("%S", FauxInstances::get_name(I));
 }
 
-void FauxInstances::write_kind(OUTPUT_STREAM, faux_instance *I) {
+void FauxInstances::write_kind(OUTPUT_STREAM, faux_instance *I) {
     WRITE("%S", I->kind_text);
 }
 
-void FauxInstances::write_kind_chain(OUTPUT_STREAM, faux_instance *I) {
+void FauxInstances::write_kind_chain(OUTPUT_STREAM, faux_instance *I) {
     WRITE("%S", I->kind_chain);
 }
 
-faux_instance *FauxInstances::region_of(faux_instance *FI) {
-    if (FI == NULL) return NULL;
-    return FI->region_enclosing;
+faux_instance *FauxInstances::region_of(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->region_enclosing;
 }
 
-faux_instance *FauxInstances::opposite_direction(faux_instance *FR) {
-    if (FR == NULL) return NULL;
-    return FR->opposite_direction;
+faux_instance *FauxInstances::opposite_direction(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->opposite_direction;
 }
 
-faux_instance *FauxInstances::other_side_of_door(faux_instance *FR) {
-    if (FR == NULL) return NULL;
-    return FR->other_side;
+faux_instance *FauxInstances::other_side_of_door(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->other_side;
 }
 
-faux_instance *FauxInstances::sibling(faux_instance *FR) {
-    if (FR == NULL) return NULL;
-    return FR->object_tree_sibling;
+faux_instance *FauxInstances::sibling(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->object_tree_sibling;
 }
 
-faux_instance *FauxInstances::child(faux_instance *FR) {
-    if (FR == NULL) return NULL;
-    return FR->object_tree_child;
+faux_instance *FauxInstances::child(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->object_tree_child;
 }
 
-faux_instance *FauxInstances::progenitor(faux_instance *FR) {
-    if (FR == NULL) return NULL;
-    return FR->progenitor;
+faux_instance *FauxInstances::progenitor(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->progenitor;
 }
 
-faux_instance *FauxInstances::incorp_child(faux_instance *FR) {
-    if (FR == NULL) return NULL;
-    return FR->incorp_tree_child;
+faux_instance *FauxInstances::incorp_child(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->incorp_tree_child;
 }
 
-faux_instance *FauxInstances::incorp_sibling(faux_instance *FR) {
-    if (FR == NULL) return NULL;
-    return FR->incorp_tree_sibling;
+faux_instance *FauxInstances::incorp_sibling(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return I->incorp_tree_sibling;
 }
 
-int FauxInstances::is_a_direction(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_direction")) return TRUE;
+int FauxInstances::is_a_direction(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_direction")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_room(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_room")) return TRUE;
+int FauxInstances::is_a_room(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_room")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_door(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_door")) return TRUE;
+int FauxInstances::is_a_door(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_door")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_region(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_region")) return TRUE;
+int FauxInstances::is_a_region(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_region")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_backdrop(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_backdrop")) return TRUE;
+int FauxInstances::is_a_backdrop(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_backdrop")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_thing(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_thing")) return TRUE;
+int FauxInstances::is_a_thing(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_thing")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_supporter(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_supporter")) return TRUE;
+int FauxInstances::is_a_supporter(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_supporter")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_person(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_person")) return TRUE;
+int FauxInstances::is_a_person(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_person")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_worn(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_worn")) return TRUE;
+int FauxInstances::is_worn(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_worn")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_everywhere(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_everywhere")) return TRUE;
+int FauxInstances::is_everywhere(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_everywhere")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::is_a_part(faux_instance *FR) {
-    if (FR == NULL) return FALSE;
-    if (Metadata::read_optional_numeric(FR->package, I"^is_a_part")) return TRUE;
+int FauxInstances::is_a_part(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Metadata::read_optional_numeric(I->package, I"^is_a_part")) return TRUE;
     return FALSE;
 }
 
-int FauxInstances::created_at(faux_instance *FR) {
-    if (FR == NULL) return -1;
-    return (int) Metadata::read_optional_numeric(FR->package,  I"^at");
+int FauxInstances::created_at(faux_instance *I) {
+    if (I == NULL) return -1;
+    return (int) Metadata::read_optional_numeric(I->package,  I"^at");
 }
 
-int FauxInstances::kind_set_at(faux_instance *FR) {
-    if (FR == NULL) return -1;
-    return (int) Metadata::read_optional_numeric(FR->package,  I"^kind_set_at");
+int FauxInstances::kind_set_at(faux_instance *I) {
+    if (I == NULL) return -1;
+    return (int) Metadata::read_optional_numeric(I->package,  I"^kind_set_at");
 }
 
-int FauxInstances::progenitor_set_at(faux_instance *FR) {
-    if (FR == NULL) return -1;
-    return (int) Metadata::read_optional_numeric(FR->package,  I"^progenitor_set_at");
+int FauxInstances::progenitor_set_at(faux_instance *I) {
+    if (I == NULL) return -1;
+    return (int) Metadata::read_optional_numeric(I->package,  I"^progenitor_set_at");
 }
 
-int FauxInstances::region_set_at(faux_instance *FR) {
-    if (FR == NULL) return -1;
-    return (int) Metadata::read_optional_numeric(FR->package,  I"^region_set_at");
+int FauxInstances::region_set_at(faux_instance *I) {
+    if (I == NULL) return -1;
+    return (int) Metadata::read_optional_numeric(I->package,  I"^region_set_at");
 }
 
-void FauxInstances::get_door_data(faux_instance *door, faux_instance **c1, faux_instance **c2) {
+void FauxInstances::get_door_data(faux_instance *door,
+    faux_instance **c1, faux_instance **c2) {
     if (c1) *c1 = door->fimd.map_connection_a;
     if (c2) *c2 = door->fimd.map_connection_b;
 }
 
-map_parameter_scope *FauxInstances::get_parameters(faux_instance *R) {
-    if (R == NULL) return NULL;
-    return &(R->fimd.local_map_parameters);
+map_parameter_scope *FauxInstances::get_parameters(faux_instance *I) {
+    if (I == NULL) return NULL;
+    return &(I->fimd.local_map_parameters);
 }
 
-int FauxInstances::specify_kind(faux_instance *FI) {
-    if (FI == NULL) return FALSE;
-    if (Str::eq(FI->kind_text, I"thing")) return FALSE;
-    if (Str::eq(FI->kind_text, I"room")) return FALSE;
+int FauxInstances::specify_kind(faux_instance *I) {
+    if (I == NULL) return FALSE;
+    if (Str::eq(I->kind_text, I"thing")) return FALSE;
+    if (Str::eq(I->kind_text, I"room")) return FALSE;
     return TRUE;
 }
 
-

§11. Noun usage. This simply avoids repetitions in the World index: +

§14. Appearance counts. This code simply avoids repetitions in the World index:

-void FauxInstances::increment_indexing_count(faux_instance *I) {
+void FauxInstances::increment_indexing_count(faux_instance *I) {
     I->index_appearances++;
 }
 
-int FauxInstances::indexed_yet(faux_instance *I) {
+int FauxInstances::indexed_yet(faux_instance *I) {
     if (I->index_appearances > 0) return TRUE;
     return FALSE;
 }
diff --git a/docs/index-module/2-ii.html b/docs/index-module/2-ii.html
index 48afbf6f1..ed4d406b8 100644
--- a/docs/index-module/2-ii.html
+++ b/docs/index-module/2-ii.html
@@ -329,10 +329,10 @@ of the Inter tree currently being indexed.
 
 
 faux_instance_set *indexing_fis = NULL;
-faux_instance_set *InterpretIndex::get_faux_instances(void) {
+faux_instance_set *InterpretIndex::get_faux_instances(void) {
     if (indexing_fis == NULL) {
         if (indexing_tree == NULL) internal_error("no indexing lexicon");
-        indexing_fis = FauxInstances::make_faux(indexing_tree);
+        indexing_fis = FauxInstances::make_faux(indexing_tree);
     }
     return indexing_fis;
 }
diff --git a/docs/index-module/3-me.html b/docs/index-module/3-me.html
index ddd77ea38..95c84921f 100644
--- a/docs/index-module/3-me.html
+++ b/docs/index-module/3-me.html
@@ -105,8 +105,8 @@ function togglePopup(material_id) {
     faux_instance *I;
     LOOP_OVER_FAUX_INSTANCES(faux_set, I)
         if ((MapElement::no_detail_index(I))
-            || (FauxInstances::is_a_direction(I)))
-            FauxInstances::increment_indexing_count(I);
+            || (FauxInstances::is_a_direction(I)))
+            FauxInstances::increment_indexing_count(I);
 

§1.2. Give room details within each region in turn in the World index1.2 = @@ -115,12 +115,12 @@ function togglePopup(material_id) {

     faux_instance *reg;
     LOOP_OVER_FAUX_INSTANCES(faux_set, reg)
-        if (FauxInstances::is_a_region(reg)) {
+        if (FauxInstances::is_a_region(reg)) {
             int subheaded = FALSE;
-            FauxInstances::increment_indexing_count(reg);
+            FauxInstances::increment_indexing_count(reg);
             faux_instance *rm;
             LOOP_OVER_FAUX_ROOMS(faux_set, rm)
-                if (FauxInstances::region_of(rm) == reg) {
+                if (FauxInstances::region_of(rm) == reg) {
                     if (subheaded == FALSE) {
                         Start a new details panel on the World index1.2.2;
                         Index the name and super-region of the region1.2.1;
@@ -129,7 +129,7 @@ function togglePopup(material_id) {
                         subheaded = TRUE;
                     }
                     PL::HTMLMap::render_single_room_as_HTML(OUT, rm);
-                    FauxInstances::increment_indexing_count(rm);
+                    FauxInstances::increment_indexing_count(rm);
                 }
         }
 
@@ -138,9 +138,9 @@ function togglePopup(material_id) {

-    WRITE("<b>The <i>%S</i> region", FauxInstances::get_name(reg));
-    faux_instance *within = FauxInstances::region_of(reg);
-    if (within) WRITE(" within the <i>%S</i> region", FauxInstances::get_name(within));
+    WRITE("<b>The <i>%S</i> region", FauxInstances::get_name(reg));
+    faux_instance *within = FauxInstances::region_of(reg);
+    if (within) WRITE(" within the <i>%S</i> region", FauxInstances::get_name(within));
     WRITE("</b>");
 
@@ -150,7 +150,7 @@ function togglePopup(material_id) {
     faux_instance *I;
     LOOP_OVER_FAUX_ROOMS(faux_set, I)
-        if (FauxInstances::indexed_yet(I) == FALSE) {
+        if (FauxInstances::indexed_yet(I) == FALSE) {
             Start a new details panel on the World index1.2.2;
             PL::HTMLMap::render_single_room_as_HTML(OUT, I);
         }
@@ -169,8 +169,8 @@ will be things which are offstage (and their contents and any parts thereof):
     int out_of_play_count = 0;
     faux_instance *I;
     LOOP_OVER_FAUX_INSTANCES(faux_set, I)
-        if ((FauxInstances::indexed_yet(I) == FALSE) &&
-            (FauxInstances::progenitor(I) == NULL)) {
+        if ((FauxInstances::indexed_yet(I) == FALSE) &&
+            (FauxInstances::progenitor(I) == NULL)) {
             Start a new details panel on the World index1.2.2;
             if (++out_of_play_count == 1) {
                 suppress_panel_changes = TRUE;
@@ -210,8 +210,8 @@ will be things which are offstage (and their contents and any parts thereof):
     if (depth == MAX_OBJECT_INDEX_DEPTH) internal_error("MAX_OBJECT_INDEX_DEPTH exceeded");
     if (I) {
         if (depth > NUMBER_CREATED(faux_instance) + 1) return;  to recover from errors
-        FauxInstances::increment_indexing_count(I);
-        if (FauxInstances::is_a_room(I)) indexing_room = I;
+        FauxInstances::increment_indexing_count(I);
+        if (FauxInstances::is_a_room(I)) indexing_room = I;
     }
     Begin the object citation line2.1;
     int xtra = -1;
@@ -266,13 +266,13 @@ will be things which are offstage (and their contents and any parts thereof):
 
 
     TEMPORARY_TEXT(name)
-    FauxInstances::write_name(name, I);
-    if ((Str::len(name) == 0) && (I)) FauxInstances::write_kind(name, I);
+    FauxInstances::write_name(name, I);
+    if ((Str::len(name) == 0) && (I)) FauxInstances::write_kind(name, I);
     if (Str::len(name) == 0) {
         WRITE("nameless");
     } else {
         int embolden = details;
-        if (FauxInstances::is_a_room(I)) embolden = TRUE;
+        if (FauxInstances::is_a_room(I)) embolden = TRUE;
         if (embolden) WRITE("<b>");
         WRITE("%S", name);
         if (embolden) WRITE("</b>");
@@ -286,7 +286,7 @@ will be things which are offstage (and their contents and any parts thereof):
 
     if (I) {
         WRITE(", a kind of ");
-        FauxInstances::write_kind(OUT, I);
+        FauxInstances::write_kind(OUT, I);
     }
 
@@ -296,9 +296,9 @@ will be things which are offstage (and their contents and any parts thereof):
     if ((MapElement::annotate_door(OUT, I) == FALSE) &&
         (MapElement::annotate_player(OUT, I) == FALSE)) {
-        if (FauxInstances::specify_kind(I)) {
+        if (FauxInstances::specify_kind(I)) {
             WRITE(" - <i>");
-            FauxInstances::write_kind(OUT, I);
+            FauxInstances::write_kind(OUT, I);
             WRITE("</i>");
         }
     }
@@ -308,8 +308,8 @@ will be things which are offstage (and their contents and any parts thereof):
 

-    if (FauxInstances::created_at(I) > 0)
-        IndexUtilities::link(OUT, FauxInstances::created_at(I));
+    if (FauxInstances::created_at(I) > 0)
+        IndexUtilities::link(OUT, FauxInstances::created_at(I));
 
  • This code is used in §2.

§2.6. This either recurses down through subkinds or through the spatial hierarchy. @@ -338,10 +338,10 @@ will be things which are offstage (and their contents and any parts thereof):

     HTML::open_indented_p(OUT, 1, "tight");
-    FauxInstances::write_kind_chain(OUT, I);
-    if (FauxInstances::kind_set_at(I) > 0) IndexUtilities::link(OUT, FauxInstances::kind_set_at(I));
+    FauxInstances::write_kind_chain(OUT, I);
+    if (FauxInstances::kind_set_at(I) > 0) IndexUtilities::link(OUT, FauxInstances::kind_set_at(I));
     WRITE(" &gt; <b>");
-    FauxInstances::write_name(OUT, I);
+    FauxInstances::write_name(OUT, I);
     WRITE("</b>");
     HTML_CLOSE("p");
 
@@ -389,22 +389,22 @@ will be things which are offstage (and their contents and any parts thereof): } int MapElement::add_room_to_World_index(OUTPUT_STREAM, faux_instance *O) { - if ((O) && (FauxInstances::is_a_room(O))) { + if ((O) && (FauxInstances::is_a_room(O))) { PL::SpatialMap::index_room_connections(OUT, O); } return FALSE; } int MapElement::add_region_to_World_index(OUTPUT_STREAM, faux_instance *O) { - if ((O) && (FauxInstances::is_a_room(O))) { - faux_instance *R = FauxInstances::region_of(O); - if (R) PL::HTMLMap::colour_chip(OUT, O, R, FauxInstances::region_set_at(O)); + if ((O) && (FauxInstances::is_a_room(O))) { + faux_instance *R = FauxInstances::region_of(O); + if (R) PL::HTMLMap::colour_chip(OUT, O, R, FauxInstances::region_set_at(O)); } return FALSE; } int MapElement::annotate_player(OUTPUT_STREAM, faux_instance *I) { - if (I == FauxInstances::start_room()) { + if (I == FauxInstances::start_room()) { WRITE(" - <i>room where play begins</i>"); IndexUtilities::DocReferences::link(OUT, I"ROOMPLAYBEGINS"); return TRUE; @@ -413,16 +413,16 @@ will be things which are offstage (and their contents and any parts thereof): } int MapElement::annotate_door(OUTPUT_STREAM, faux_instance *O) { - if ((O) && (FauxInstances::is_a_door(O))) { + if ((O) && (FauxInstances::is_a_door(O))) { faux_instance *A = NULL, *B = NULL; - FauxInstances::get_door_data(O, &A, &B); + FauxInstances::get_door_data(O, &A, &B); if ((A) && (B)) WRITE(" - <i>door to "); else WRITE(" - <i>one-sided door to "); faux_instance *X = A; if (A == MapElement::room_being_indexed()) X = B; - if (X == NULL) X = FauxInstances::other_side_of_door(O); + if (X == NULL) X = FauxInstances::other_side_of_door(O); if (X == NULL) WRITE("nowhere"); - else FauxInstances::write_name(OUT, X); + else FauxInstances::write_name(OUT, X); WRITE("</i>"); return TRUE; } @@ -434,13 +434,13 @@ will be things which are offstage (and their contents and any parts thereof):
 void MapElement::index_spatial_relationship(OUTPUT_STREAM, faux_instance *I) {
     char *rel = NULL;
-    faux_instance *P = FauxInstances::progenitor(I);
+    faux_instance *P = FauxInstances::progenitor(I);
     if (P) {
          we could set rel to "in" here, but the index omits that for clarity
-        if (FauxInstances::is_a_supporter(P)) rel = "on";
-        if (FauxInstances::is_a_person(P)) rel = "carried";
-        if (FauxInstances::is_a_part(I)) rel = "part";
-        if (FauxInstances::is_worn(I)) rel = "worn";
+        if (FauxInstances::is_a_supporter(P)) rel = "on";
+        if (FauxInstances::is_a_person(P)) rel = "carried";
+        if (FauxInstances::is_a_part(I)) rel = "part";
+        if (FauxInstances::is_worn(I)) rel = "worn";
     }
     if (rel) WRITE("<i>%s</i> ", rel);
 }
@@ -451,7 +451,7 @@ it already turns up under its owner.
 
 
 int MapElement::no_detail_index(faux_instance *I) {
-    if (FauxInstances::is_a_part(I)) return TRUE;
+    if (FauxInstances::is_a_part(I)) return TRUE;
     return FALSE;
 }
 
@@ -462,22 +462,22 @@ it already turns up under its owner. void MapElement::index_object_further(OUTPUT_STREAM, faux_instance *I, int depth, int details) { faux_instance_set *faux_set = InterpretIndex::get_faux_instances(); if (depth > NUMBER_CREATED(faux_instance) + 1) return; to recover from errors - if (FauxInstances::incorp_child(I)) { - faux_instance *I2 = FauxInstances::incorp_child(I); + if (FauxInstances::incorp_child(I)) { + faux_instance *I2 = FauxInstances::incorp_child(I); while (I2) { MapElement::index(OUT, I2, depth+1, details); - I2 = FauxInstances::incorp_sibling(I2); + I2 = FauxInstances::incorp_sibling(I2); } } - if (FauxInstances::child(I)) - MapElement::index(OUT, FauxInstances::child(I), depth+1, details); - if ((FauxInstances::is_a_room(I)) && - (FauxInstances::is_a_door(I) == FALSE)) { + if (FauxInstances::child(I)) + MapElement::index(OUT, FauxInstances::child(I), depth+1, details); + if ((FauxInstances::is_a_room(I)) && + (FauxInstances::is_a_door(I) == FALSE)) { faux_instance *I2; LOOP_OVER_FAUX_INSTANCES(faux_set, I2) { - if ((FauxInstances::is_a_door(I2)) && (FauxInstances::progenitor(I2) != I)) { + if ((FauxInstances::is_a_door(I2)) && (FauxInstances::progenitor(I2) != I)) { faux_instance *A = NULL, *B = NULL; - FauxInstances::get_door_data(I2, &A, &B); + FauxInstances::get_door_data(I2, &A, &B); if (A == I) MapElement::index(OUT, I2, depth+1, details); if (B == I) MapElement::index(OUT, I2, depth+1, details); } @@ -486,8 +486,8 @@ it already turns up under its owner. MapElement::index_player_further(OUT, I, depth, details); MapElement::index_backdrop_further(OUT, I, depth, details, 0); - if (FauxInstances::sibling(I)) - MapElement::index(OUT, FauxInstances::sibling(I), depth, details); + if (FauxInstances::sibling(I)) + MapElement::index(OUT, FauxInstances::sibling(I), depth, details); }

§7. And also: @@ -495,19 +495,19 @@ it already turns up under its owner.

 int MapElement::add_to_World_index(OUTPUT_STREAM, faux_instance *O) {
-    if ((O) && (FauxInstances::is_a_thing(O))) {
+    if ((O) && (FauxInstances::is_a_thing(O))) {
         HTML::open_indented_p(OUT, 1, "tight");
-        faux_instance *P = FauxInstances::progenitor(O);
+        faux_instance *P = FauxInstances::progenitor(O);
         if (P) {
             WRITE("<i>initial location:</i> ");
             char *rel = "in";
-            if (FauxInstances::is_a_supporter(P)) rel = "on";
-            if (FauxInstances::is_a_person(P)) rel = "carried by";
-            if (FauxInstances::is_a_part(O)) rel = "part of";
-            if (FauxInstances::is_worn(O)) rel = "worn by";
+            if (FauxInstances::is_a_supporter(P)) rel = "on";
+            if (FauxInstances::is_a_person(P)) rel = "carried by";
+            if (FauxInstances::is_a_part(O)) rel = "part of";
+            if (FauxInstances::is_worn(O)) rel = "worn by";
             WRITE("%s ", rel);
-            FauxInstances::write_name(OUT, P);
-            int at = FauxInstances::progenitor_set_at(O);
+            FauxInstances::write_name(OUT, P);
+            int at = FauxInstances::progenitor_set_at(O);
             if (at) IndexUtilities::link(OUT, at);
 
         }
@@ -517,9 +517,9 @@ it already turns up under its owner.
 }
 
 void MapElement::index_player_further(OUTPUT_STREAM, faux_instance *I, int depth, int details) {
-    faux_instance *yourself = FauxInstances::yourself();
-    if ((I == FauxInstances::start_room()) && (yourself) &&
-        (FauxInstances::indexed_yet(yourself) == FALSE))
+    faux_instance *yourself = FauxInstances::yourself();
+    if ((I == FauxInstances::start_room()) && (yourself) &&
+        (FauxInstances::indexed_yet(yourself) == FALSE))
         MapElement::index(OUT, yourself, depth+1, details);
 }
 
@@ -535,7 +535,7 @@ it already turns up under its owner.
         }
     } else {
         LOOP_OVER_FAUX_BACKDROPS(faux_set, bd)
-            if (FauxInstances::is_everywhere(bd)) {
+            if (FauxInstances::is_everywhere(bd)) {
                 if (++discoveries == 1) Insert fore-matter7.1;
                 MapElement::index(OUT, bd, depth+1, details);
             }
diff --git a/docs/index-module/4-mc.html b/docs/index-module/4-mc.html
index a7ba5a8cd..ce327c783 100644
--- a/docs/index-module/4-mc.html
+++ b/docs/index-module/4-mc.html
@@ -292,11 +292,11 @@ If all are null, then the global scope is used.
 

-void ConfigureIndexMap::put_mp(text_stream *name, map_parameter_scope *scope, faux_instance *scope_I,
+void ConfigureIndexMap::put_mp(text_stream *name, map_parameter_scope *scope, faux_instance *scope_I,
     text_stream *put_string, int put_integer) {
     if (scope == NULL) {
         if (scope_I == NULL) scope = ConfigureIndexMap::global();
-        else scope = FauxInstances::get_parameters(scope_I);
+        else scope = FauxInstances::get_parameters(scope_I);
     }
     if (Str::cmp(name, I"room-colour") == 0) {
         if (scope == ConfigureIndexMap::global()) changed_global_room_colour = TRUE;
diff --git a/docs/index-module/4-rem.html b/docs/index-module/4-rem.html
index 3917dc848..c7995a29f 100644
--- a/docs/index-module/4-rem.html
+++ b/docs/index-module/4-rem.html
@@ -97,7 +97,7 @@ MathJax = {
     for (int z=Universe.corner1.z; z>=Universe.corner0.z; z--)
         Create an EPS map level for this z-slice1.2;
 
-    FauxInstances::decode_hints(faux_set, I, 2);
+    FauxInstances::decode_hints(faux_set, I, 2);
     if (changed_global_room_colour == FALSE)
         Inherit EPS room colours from those used in the World Index1.3;
 }
@@ -153,7 +153,7 @@ MathJax = {
 
     LOOP_OVER_FAUX_ROOMS(faux_set, R)
         if (Room_position(R).z == z) {
-            FauxInstances::get_parameters(R)->wider_scope = &(eml->map_parameters);
+            FauxInstances::get_parameters(R)->wider_scope = &(eml->map_parameters);
         }
 
  • This code is used in §1.
@@ -163,7 +163,7 @@ MathJax = {
     faux_instance *R;
     LOOP_OVER_FAUX_ROOMS(faux_set, R)
-        ConfigureIndexMap::put_text_mp(I"room-colour", FauxInstances::get_parameters(R),
+        ConfigureIndexMap::put_text_mp(I"room-colour", FauxInstances::get_parameters(R),
             R->fimd.colour);
 
  • This code is used in §1.
@@ -313,7 +313,7 @@ rectangle around the whole thing...

-    map_parameter_scope *room_scope = FauxInstances::get_parameters(R);
+    map_parameter_scope *room_scope = FauxInstances::get_parameters(R);
     int bx = Room_position(R).x-Universe.corner0.x;
     int by = Room_position(R).y-eml->y_min;
     int offs = ConfigureIndexMap::get_int_mp(I"room-offset", room_scope);
@@ -335,7 +335,7 @@ rectangle around the whole thing...
 

-    map_parameter_scope *room_scope = FauxInstances::get_parameters(R);
+    map_parameter_scope *room_scope = FauxInstances::get_parameters(R);
     RenderEPSMap::EPS_compile_line_width_setting(OUT, ConfigureIndexMap::get_int_mp(I"route-thickness", room_scope));
 
     int bx = R->fimd.eps_x;
@@ -346,7 +346,7 @@ rectangle around the whole thing...
     LOOP_OVER_STORY_DIRECTIONS(dir) {
         faux_instance *T = PL::SpatialMap::room_exit(R, dir, NULL);
         int exit = story_dir_to_page_dir[dir];
-        if (FauxInstances::is_a_room(T))
+        if (FauxInstances::is_a_room(T))
             Draw a single map connection as an EPS arrow2.6.1;
     }
     RenderEPSMap::EPS_compile_line_width_unsetting(OUT);
@@ -356,7 +356,7 @@ rectangle around the whole thing...
 

-    int T_stiffness = ConfigureIndexMap::get_int_mp(I"route-stiffness", FauxInstances::get_parameters(T));
+    int T_stiffness = ConfigureIndexMap::get_int_mp(I"route-stiffness", FauxInstances::get_parameters(T));
     if (ConfigureIndexMap::get_int_mp(I"monochrome", level_scope)) RenderEPSMap::EPS_compile_set_greyscale(OUT, 0);
     else RenderEPSMap::EPS_compile_set_colour(OUT, ConfigureIndexMap::get_text_mp(I"route-colour", level_scope));
     if ((Room_position(T).z == Room_position(R).z) &&
@@ -410,7 +410,7 @@ actually go there in any visual way.
 

-    map_parameter_scope *room_scope = FauxInstances::get_parameters(R);
+    map_parameter_scope *room_scope = FauxInstances::get_parameters(R);
     int bx = R->fimd.eps_x;
     int by = R->fimd.eps_y;
     int boxsize = ConfigureIndexMap::get_int_mp(I"room-size", room_scope)/2;
@@ -473,7 +473,7 @@ actually go there in any visual way.
 
 
     rubric_holder *rh;
-    LOOP_OVER(rh, rubric_holder) {
+    LOOP_OVER_LINKED_LIST(rh, rubric_holder, faux_set->rubrics) {
         int bx = 0, by = 0;
         int xpart = rh->at_offset%10000, ypart = rh->at_offset/10000;
         int mapunit = ConfigureIndexMap::get_int_mp(I"grid-size", NULL);
@@ -527,7 +527,7 @@ on — come from here.
 
 
     if (Str::len(txt) == 0) {
-        text_stream *N = FauxInstances::get_name(I);
+        text_stream *N = FauxInstances::get_name(I);
         if (Str::len(N)) return;
         WRITE_TO(txt, "%S", N);
     }
diff --git a/docs/index-module/4-rhm.html b/docs/index-module/4-rhm.html
index 6a32b6d09..e641fc7bb 100644
--- a/docs/index-module/4-rhm.html
+++ b/docs/index-module/4-rhm.html
@@ -558,7 +558,7 @@ the details part of the World Index page) will be all right.
     Choose a map colour for each region6.1;
     Choose a map colour for each room, based on its region membership6.2;
 
-    if (FauxInstances::no_rooms() >= 2) {
+    if (FauxInstances::no_rooms() >= 2) {
         WRITE("\n\n");
         HTML::comment(OUT, I"WORLD WRITE MAP BEGINS");
         HTML_OPEN("p");
@@ -611,7 +611,7 @@ from each other.)
     faux_instance *R;
     LOOP_OVER_FAUX_ROOMS(faux_set, R)
         if (R->fimd.colour == NULL) {
-            faux_instance *reg = FauxInstances::region_of(R);
+            faux_instance *reg = FauxInstances::region_of(R);
             if (reg)
                 R->fimd.colour = Str::duplicate(reg->fimd.colour);
             else
@@ -691,7 +691,7 @@ from each other.)
             if (k == 1) {
                 HTML_OPEN("p"); WRITE("<i>Mapping ");
             } else WRITE("; ");
-            WRITE("%S as %S", FauxInstances::get_name(D), FauxInstances::get_name(A));
+            WRITE("%S as %S", FauxInstances::get_name(D), FauxInstances::get_name(A));
         }
     }
     if (k > 0) { WRITE("</i>"); HTML_CLOSE("p"); }
@@ -1159,18 +1159,18 @@ of the cell. First, the eight cells around the outside:
         faux_instance *I;
         LOOP_OVER_FAUX_INSTANCES(faux_set, I)
             if (I->direction_index == exit) {
-                FauxInstances::write_name(tool_tip, I);
+                FauxInstances::write_name(tool_tip, I);
                 break;
             }
         if (D) {
             if (I3 == NULL) WRITE_TO(tool_tip, " exit blocked by ");
             else WRITE_TO(tool_tip, " through ");
-            FauxInstances::write_name(tool_tip, D);
+            FauxInstances::write_name(tool_tip, D);
 
         }
         if (I3) {
             WRITE_TO(tool_tip, " to ");
-            FauxInstances::write_name(tool_tip, I3);
+            FauxInstances::write_name(tool_tip, I3);
         }
         WRITE_TO(tool_tip, "\"");
     }
@@ -1189,12 +1189,12 @@ which are bordered and coloured single-cell tables.
 void PL::HTMLMap::index_room_square(OUTPUT_STREAM, faux_instance *I, int pass) {
     if (I) {
         int b = ROOM_BORDER_SIZE;
-        if ((I == FauxInstances::benchmark()) && (pass == 1)) b = B_ROOM_BORDER_SIZE;
+        if ((I == FauxInstances::benchmark()) && (pass == 1)) b = B_ROOM_BORDER_SIZE;
         HTML_OPEN_WITH("table",
             "border=\"%d\" cellpadding=\"0\" cellspacing=\"0\" "
             "bordercolor=\"#%s\" width=\"%d\" height=\"%d\" "
             "title=\"%S\"",
-            b, ROOM_BORDER_COLOUR, MAP_CELL_INNER_SIZE, MAP_CELL_INNER_SIZE, FauxInstances::get_name(I));
+            b, ROOM_BORDER_COLOUR, MAP_CELL_INNER_SIZE, MAP_CELL_INNER_SIZE, FauxInstances::get_name(I));
         HTML_OPEN("tr");
         HTML_OPEN_WITH("td", "valign=\"middle\" align=\"center\" bgcolor=\"#%S\"",
             I->fimd.colour);
@@ -1223,7 +1223,7 @@ which are bordered and coloured single-cell tables.
             I->allocation_id);
         HTML::begin_colour(OUT, col);
     }
-    if ((pass == 1) && (I == FauxInstances::benchmark())) HTML_OPEN("b");
+    if ((pass == 1) && (I == FauxInstances::benchmark())) HTML_OPEN("b");
     TEMPORARY_TEXT(abbrev)
     WRITE_TO(abbrev, "%S", I->abbrev);
     #ifdef HTML_MAP_FONT_SIZE
@@ -1234,7 +1234,7 @@ which are bordered and coloured single-cell tables.
     #ifdef HTML_MAP_FONT_SIZE
     HTML_CLOSE("span");
     #endif
-    if ((pass == 1) && (I == FauxInstances::benchmark())) HTML_CLOSE("b");
+    if ((pass == 1) && (I == FauxInstances::benchmark())) HTML_CLOSE("b");
     if (pass == 1) { HTML::end_colour(OUT); HTML_CLOSE("a"); }
     DISCARD_TEXT(abbrev)
 
@@ -1253,7 +1253,7 @@ This is the chip shown on the "details" box for a room in the World Index. HTML_OPEN_WITH("td", "valign=\"middle\" align=\"center\" bgcolor=\"#%S\"", Reg->fimd.colour); WRITE("&nbsp;"); - FauxInstances::write_name(OUT, Reg); WRITE(" region"); + FauxInstances::write_name(OUT, Reg); WRITE(" region"); if (at > 0) IndexUtilities::link(OUT, at); WRITE("&nbsp;"); HTML_CLOSE("td"); @@ -1281,13 +1281,13 @@ that nothing is shown if all of the rooms are outside of regions. int count = 0; faux_instance *R; LOOP_OVER_FAUX_ROOMS(faux_set, R) { - if (FauxInstances::region_of(R) == reg) { + if (FauxInstances::region_of(R) == reg) { if (count++ == 0) { Start the region key table for this region13.1; } else { WRITE(", "); } - WRITE("%S", FauxInstances::get_name(R)); + WRITE("%S", FauxInstances::get_name(R)); } } if (count > 0) End the region key table for this region13.2; @@ -1306,7 +1306,7 @@ that nothing is shown if all of the rooms are outside of regions. HTML_CLOSE("td"); WRITE("\n"); HTML_OPEN_WITH("td", "valign=\"middle\" align=\"left\""); WRITE("<b>"); - if (reg) WRITE("%S", FauxInstances::get_name(reg)); + if (reg) WRITE("%S", FauxInstances::get_name(reg)); else WRITE("<i>Not in any region</i>"); WRITE("</b>: ");
diff --git a/docs/index-module/4-sm.html b/docs/index-module/4-sm.html index 723e708af..df7a001c5 100644 --- a/docs/index-module/4-sm.html +++ b/docs/index-module/4-sm.html @@ -180,9 +180,9 @@ This is usually the room in which the player begins.

-int PL::SpatialMap::benchmark_level(void) {
-    if (FauxInstances::benchmark() == NULL) return 0;
-    return Room_position(FauxInstances::benchmark()).z;
+int PL::SpatialMap::benchmark_level(void) {
+    if (FauxInstances::benchmark() == NULL) return 0;
+    return Room_position(FauxInstances::benchmark()).z;
 }
 

§5. We are going to be iterating through the set of rooms often. Looping over @@ -268,7 +268,7 @@ given exit to be locked in place, forbidding it to be distorted.

-void PL::SpatialMap::lock_exit_in_place(faux_instance *I, int exit, faux_instance *I2) {
+void PL::SpatialMap::lock_exit_in_place(faux_instance *I, int exit, faux_instance *I2) {
     PL::SpatialMap::lock_one_exit(I2, exit, I);
     PL::SpatialMap::lock_one_exit(I, PL::SpatialMap::opposite(exit), I2);
 }
@@ -445,7 +445,7 @@ we use these hard-wired macros instead.
 
define LOOP_OVER_DIRECTION_NUMBERS(i)
     for (i=0; i<12; i++)
 define LOOP_OVER_STORY_DIRECTIONS(i)
-    for (i=0; ((i<FauxInstances::no_directions()) && (i<MAX_DIRECTIONS)); i++)
+    for (i=0; ((i<FauxInstances::no_directions()) && (i<MAX_DIRECTIONS)); i++)
 define LOOP_OVER_LATTICE_DIRECTIONS(i)
     for (i=0; i<10; i++)
 define LOOP_OVER_NONLATTICE_DIRECTIONS(i)
@@ -531,17 +531,17 @@ door, which we take a note of if asked to do so.
 
 faux_instance *PL::SpatialMap::room_exit(faux_instance *origin, int dir_num, faux_instance **via) {
     if (via) *via = NULL;
-    if ((origin == NULL) || (FauxInstances::is_a_room(origin) == FALSE) ||
+    if ((origin == NULL) || (FauxInstances::is_a_room(origin) == FALSE) ||
         (dir_num < 0) || (dir_num >= MAX_DIRECTIONS)) return NULL;
     faux_instance *ultimate_destination = NULL;
     faux_instance *immediate_destination = origin->fimd.exits[dir_num];
     if (immediate_destination) {
-        if (FauxInstances::is_a_room(immediate_destination))
+        if (FauxInstances::is_a_room(immediate_destination))
             ultimate_destination = immediate_destination;
-        if (FauxInstances::is_a_door(immediate_destination)) {
+        if (FauxInstances::is_a_door(immediate_destination)) {
             if (via) *via = immediate_destination;
             faux_instance *A = NULL, *B = NULL;
-            FauxInstances::get_door_data(immediate_destination, &A, &B);
+            FauxInstances::get_door_data(immediate_destination, &A, &B);
             if (A == origin) ultimate_destination = B;
             if (B == origin) ultimate_destination = A;
         }
@@ -1012,7 +1012,7 @@ benchmark room.
 

-    PL::SpatialMap::create_map_component_around(FauxInstances::benchmark());
+    PL::SpatialMap::create_map_component_around(FauxInstances::benchmark());
     faux_instance *R;
     LOOP_OVER_FAUX_ROOMS(faux_set, R)
         if (R->fimd.submap == NULL)
@@ -2838,8 +2838,8 @@ contain.
         faux_instance *R1 = mc1->first_room_in_submap;
         faux_instance *R2 = mc2->first_room_in_submap;
         if ((R1) && (R2)) {  which should always happen, but just in case of an error
-            faux_instance *reg1 = FauxInstances::region_of(R1);
-            faux_instance *reg2 = FauxInstances::region_of(R2);
+            faux_instance *reg1 = FauxInstances::region_of(R1);
+            faux_instance *reg2 = FauxInstances::region_of(R2);
             if ((reg1) && (reg2 == NULL)) return -1;
             if ((reg1 == NULL) && (reg2)) return 1;
             if (reg1) {
@@ -2972,12 +2972,12 @@ running time in check.
     if (sub->bounds.population == 1) {
         faux_instance *R = sub->first_room_in_submap;
         if (R) {  which should always happen, but just in case of an error
-            faux_instance *reg = FauxInstances::region_of(R);
+            faux_instance *reg = FauxInstances::region_of(R);
             if (reg) {
                 faux_instance *S, *closest_S = NULL;
                 int closest = 0;
                 LOOP_OVER_FAUX_ROOMS(faux_set, S)
-                    if ((S != R) && (FauxInstances::region_of(S) == reg))
+                    if ((S != R) && (FauxInstances::region_of(S) == reg))
                         if ((posnd == FALSE) || (S->fimd.submap->positioned)) {
                             int diff = 2*(R->allocation_id - S->allocation_id);
                             if (diff < 0) diff = 1-diff;
@@ -3075,12 +3075,12 @@ locking means that blank planes are inevitable.
 
 
 void PL::SpatialMap::index_room_connections(OUTPUT_STREAM, faux_instance *R) {
-    text_stream *RW = FauxInstances::get_name(R);  name of the origin room
+    text_stream *RW = FauxInstances::get_name(R);  name of the origin room
     faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
     faux_instance *dir;
     LOOP_OVER_FAUX_DIRECTIONS(faux_set, dir) {
         int i = dir->direction_index;
-        faux_instance *opp = FauxInstances::opposite_direction(dir);
+        faux_instance *opp = FauxInstances::opposite_direction(dir);
         int od = opp?(opp->direction_index):(-1);
         faux_instance *D = NULL;
         faux_instance *S = PL::SpatialMap::room_exit(R, i, &D);
@@ -3091,33 +3091,33 @@ locking means that blank planes are inevitable.
             else if (D) icon = "e_arrow_door_blocked";
             HTML_TAG_WITH("img", "border=0 src=inform:/map_icons/%s.png", icon);
             WRITE("&nbsp;");
-            FauxInstances::write_name(OUT, dir);
+            FauxInstances::write_name(OUT, dir);
             WRITE(" to ");
             if (S) {
-                FauxInstances::write_name(OUT, S);
+                FauxInstances::write_name(OUT, S);
                 if (D) {
                     WRITE(" via ");
-                    FauxInstances::write_name(OUT, D);
+                    FauxInstances::write_name(OUT, D);
                 }
             } else {
-                FauxInstances::write_name(OUT, D);
+                FauxInstances::write_name(OUT, D);
                 WRITE(" (a door)");
             }
             if ((S) && (opp)) {
                 faux_instance *B = PL::SpatialMap::room_exit(S, od, NULL);
                 if (B == NULL) {
                     WRITE(" (but ");
-                    FauxInstances::write_name(OUT, opp);
+                    FauxInstances::write_name(OUT, opp);
                     WRITE(" from ");
-                    FauxInstances::write_name(OUT, S);
+                    FauxInstances::write_name(OUT, S);
                     WRITE(" is nowhere)");
                 } else if (B != R) {
                     WRITE(" (but ");
-                    FauxInstances::write_name(OUT, opp);
+                    FauxInstances::write_name(OUT, opp);
                     WRITE(" from ");
-                    FauxInstances::write_name(OUT, S);
+                    FauxInstances::write_name(OUT, S);
                     WRITE(" is ");
-                    FauxInstances::write_name(OUT, B);
+                    FauxInstances::write_name(OUT, B);
                     WRITE(")");
                 }
             }
@@ -3138,7 +3138,7 @@ locking means that blank planes are inevitable.
             WRITE("; ");
         }
         TEMPORARY_TEXT(TEMP)
-        text_stream *DW = FauxInstances::get_name(dir);  name of the direction
+        text_stream *DW = FauxInstances::get_name(dir);  name of the direction
         WRITE_TO(TEMP, "%S", DW);
         Str::put_at(TEMP, 0, Characters::toupper(Str::get_at(TEMP, 0)));
         WRITE_TO(TEMP, " from ");
@@ -3170,8 +3170,8 @@ locking means that blank planes are inevitable.
                 Room_position(R).x,
                 Room_position(R).y,
                 Room_position(R).z);
-            FauxInstances::write_name(OUT, R);
-            if (R == FauxInstances::benchmark()) WRITE("  (benchmark)");
+            FauxInstances::write_name(OUT, R);
+            if (R == FauxInstances::benchmark()) WRITE("  (benchmark)");
             WRITE("\n");
         }
         WRITE("\n");
diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt
index 50459f68b..009ebdf44 100644
--- a/inform7/Figures/timings-diagnostics.txt
+++ b/inform7/Figures/timings-diagnostics.txt
@@ -1,6 +1,6 @@
 100.0% in inform7 run
-     56.1% in compilation to Inter
-         40.1% in //Sequence::undertake_queued_tasks//
+     56.0% in compilation to Inter
+         40.0% in //Sequence::undertake_queued_tasks//
           3.6% in //MajorNodes::pre_pass//
           2.6% in //MajorNodes::pass_1//
           2.1% in //RTPhrasebook::compile_entries//
@@ -16,12 +16,12 @@
           0.1% in //RTKindConstructors::compile_permissions//
           0.1% in //Task::make_built_in_kind_constructors//
           0.1% in //World::stages_II_and_III//
-          2.0% not specifically accounted for
-     42.0% in running Inter pipeline
-         10.8% in step preparation
-         10.0% in inter step 7/14: consolidate-text
-          8.3% in inter step 2/14: link
-          6.7% in inter step 14/14: generate inform6 -> auto.inf
+          1.9% not specifically accounted for
+     41.9% in running Inter pipeline
+         11.1% in step preparation
+          9.8% in inter step 7/14: consolidate-text
+          8.1% in inter step 2/14: link
+          6.9% in inter step 14/14: generate inform6 -> auto.inf
           1.5% in inter step 10/14: make-identifiers-unique
           0.4% in inter step 11/14: reconcile-verbs
           0.2% in inter step 13/14: eliminate-redundant-operations
@@ -31,6 +31,6 @@
           0.1% in inter step 12/14: eliminate-redundant-labels
           0.1% in inter step 4/14: parse-linked-matter
           0.1% in inter step 5/14: resolve-conditional-compilation
-          2.4% not specifically accounted for
-      1.6% in supervisor
-      0.2% not specifically accounted for
+          2.2% not specifically accounted for
+      1.7% in supervisor
+      0.3% not specifically accounted for
diff --git a/inter/index-module/Chapter 2/Faux Instances.w b/inter/index-module/Chapter 2/Faux Instances.w
index 7596d069a..c33603354 100644
--- a/inter/index-module/Chapter 2/Faux Instances.w	
+++ b/inter/index-module/Chapter 2/Faux Instances.w	
@@ -40,32 +40,32 @@ created.
 
 =
 faux_instance *FauxInstances::new(inter_package *pack) {
-	faux_instance *FI = CREATE(faux_instance);
-	FI->index_appearances = 0;
-	FI->package = pack;
-	FI->name = Str::duplicate(Metadata::read_textual(pack, I"^name"));
-	FI->printed_name = Str::duplicate(Metadata::read_textual(pack, I"^printed_name"));
-	FI->abbrev = Str::duplicate(Metadata::read_textual(pack, I"^abbreviation"));
-	FI->kind_text = Str::duplicate(Metadata::read_textual(pack, I"^index_kind"));
-	FI->kind_chain = Str::duplicate(Metadata::read_textual(pack, I"^index_kind_chain"));
-	FI->other_side = NULL;
-	FI->direction_index = -1;
+	faux_instance *I = CREATE(faux_instance);
+	I->index_appearances = 0;
+	I->package = pack;
+	I->name = Str::duplicate(Metadata::read_textual(pack, I"^name"));
+	I->printed_name = Str::duplicate(Metadata::read_textual(pack, I"^printed_name"));
+	I->abbrev = Str::duplicate(Metadata::read_textual(pack, I"^abbreviation"));
+	I->kind_text = Str::duplicate(Metadata::read_textual(pack, I"^index_kind"));
+	I->kind_chain = Str::duplicate(Metadata::read_textual(pack, I"^index_kind_chain"));
+	I->other_side = NULL;
+	I->direction_index = -1;
 
-	FI->backdrop_presences = NEW_LINKED_LIST(faux_instance);
-	FI->region_enclosing = NULL;
-	FI->next_room_in_submap = NULL;
-	FI->opposite_direction = NULL;
-	FI->object_tree_sibling = NULL;
-	FI->object_tree_child = NULL;
-	FI->progenitor = NULL;
-	FI->incorp_tree_sibling = NULL;
-	FI->incorp_tree_child = NULL;
+	I->backdrop_presences = NEW_LINKED_LIST(faux_instance);
+	I->region_enclosing = NULL;
+	I->next_room_in_submap = NULL;
+	I->opposite_direction = NULL;
+	I->object_tree_sibling = NULL;
+	I->object_tree_child = NULL;
+	I->progenitor = NULL;
+	I->incorp_tree_sibling = NULL;
+	I->incorp_tree_child = NULL;
 
-	FI->anchor_text = Str::new();
-	WRITE_TO(FI->anchor_text, "fi%d", FI->allocation_id);
+	I->anchor_text = Str::new();
+	WRITE_TO(I->anchor_text, "fi%d", I->allocation_id);
 
-	FI->fimd = FauxInstances::new_fimd(FI);
-	return FI;
+	I->fimd = FauxInstances::new_fimd(I);
+	return I;
 }
 
 @ Though the FI structure mostly paraphrases data in the Inter tree which in
@@ -99,7 +99,7 @@ typedef struct fi_map_data {
 @ Data which is blanked out, ready for use, here:
 
 =
-fi_map_data FauxInstances::new_fimd(faux_instance *FI) {
+fi_map_data FauxInstances::new_fimd(faux_instance *I) {
 	fi_map_data fimd;
 	fimd.submap = NULL;
 	fimd.position = Geometry::zero();
@@ -124,8 +124,11 @@ fi_map_data FauxInstances::new_fimd(faux_instance *FI) {
 	return fimd;
 }
 
+@h Sets.
+Since we might want to index multiple different Inter trees in the same run,
+we may need to keep multiple sets of faux instances, one for each tree. So:
 
-@ =
+=
 typedef struct faux_instance_set {
 	int no_direction_fi;
 	int no_room_fi;
@@ -133,10 +136,24 @@ typedef struct faux_instance_set {
 	struct faux_instance *start_faux_instance;
 	struct faux_instance *faux_yourself;
 	struct faux_instance *faux_benchmark;
+	struct linked_list *rubrics; /* of |rubric_holder| */
 	CLASS_DEFINITION
 } faux_instance_set;
 
-@ Iterating over faux instances in a set:
+@ =
+faux_instance_set *FauxInstances::new_empty_set(void) {
+	faux_instance_set *faux_set = CREATE(faux_instance_set);
+	faux_set->no_direction_fi = 0;
+	faux_set->no_room_fi = 0;
+	faux_set->instances = NEW_LINKED_LIST(faux_instance);
+	faux_set->start_faux_instance = NULL;
+	faux_set->faux_yourself = NULL;
+	faux_set->faux_benchmark = NULL;
+	faux_set->rubrics = NEW_LINKED_LIST(rubric_holder);
+	return faux_set;
+}
+
+@ Iterating over faux instances in a set can then be done thus:
 		
 @d LOOP_OVER_FAUX_INSTANCES(faux_set, R)
 	LOOP_OVER_LINKED_LIST(R, faux_instance, faux_set->instances)
@@ -156,91 +173,128 @@ typedef struct faux_instance_set {
 	LOOP_OVER_FAUX_INSTANCES(faux_set, R)
 		if (FauxInstances::is_a_backdrop(R))
 
-@
+@ And here is the code to make a fully cross-referenced set from a given tree:
 
 =
 faux_instance_set *FauxInstances::make_faux(inter_tree *IT) {
-	faux_instance_set *faux_set = CREATE(faux_instance_set);
-	faux_set->no_direction_fi = 0;
-	faux_set->no_room_fi = 0;
-	faux_set->instances = NEW_LINKED_LIST(faux_instance);
-	faux_set->start_faux_instance = NULL;
-	faux_set->faux_yourself = NULL;
-	faux_set->faux_benchmark = NULL;
+	faux_instance_set *faux_set = FauxInstances::new_empty_set();
 
 	tree_inventory *inv = Synoptic::inv(IT);
 	TreeLists::sort(inv->instance_nodes, Synoptic::module_order);
 	for (int i=0; iinstance_nodes); i++) {
 		inter_package *pack = Inter::Package::defined_by_frame(inv->instance_nodes->list[i].node);
 		if (Metadata::read_optional_numeric(pack,  I"^is_object") == 0) continue;
-		faux_instance *FI = FauxInstances::new(pack);
-		ADD_TO_LINKED_LIST(FI, faux_instance, faux_set->instances);	
-		if (FauxInstances::is_a_direction(FI)) FI->direction_index = faux_set->no_direction_fi++;
-		if (FauxInstances::is_a_room(FI)) faux_set->no_room_fi++;
-		if (Metadata::read_optional_numeric(pack, I"^is_yourself")) faux_set->faux_yourself = FI;
-		if (Metadata::read_optional_numeric(pack, I"^is_benchmark_room")) faux_set->faux_benchmark = FI;
-		if (Metadata::read_optional_numeric(pack, I"^is_start_room")) faux_set->start_faux_instance = FI;
+		@;
 	}
-	faux_instance *FI;
-	LOOP_OVER_FAUX_ROOMS(faux_set, FI) {
-		inter_package *pack = FI->package;
-		inter_tree_node *P = Metadata::read_optional_list(pack, I"^map");
-		if (P) {
-			for (int i=0; i= P->W.extent) break;
-				inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
-				if (v1 == ALIAS_IVAL) {
-					inter_symbol *s = InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
-					if (s == NULL) internal_error("malformed map metadata");
-					FI->fimd.exits[i] = FauxInstances::fis(faux_set, s);
-				} else if ((v1 != LITERAL_IVAL) || (v2 != 0)) internal_error("malformed map metadata");
-				inter_ti v3 = P->W.data[offset+2], v4 = P->W.data[offset+3];
-				if (v3 != LITERAL_IVAL) internal_error("malformed map metadata");
-				if (v4) FI->fimd.exits_set_at[i] = (int) v4;
-			}
-		}
-	}
-	LOOP_OVER_FAUX_BACKDROPS(faux_set, FI) {
-		inter_package *pack = FI->package;
-		inter_tree_node *P = Metadata::read_optional_list(pack, I"^backdrop_presences");
-		if (P) {
-			int offset = DATA_CONST_IFLD;
-			while (offset < P->W.extent) {
-				inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
-				if (v1 == ALIAS_IVAL) {
-					inter_symbol *s = InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
-					if (s == NULL) internal_error("malformed map metadata");
-					faux_instance *FL = FauxInstances::fis(faux_set, s);
-					ADD_TO_LINKED_LIST(FI, faux_instance, FL->backdrop_presences);
-				} else internal_error("malformed backdrop metadata");
-				offset += 2;
-			}
-		}
+	faux_instance *I;
+	LOOP_OVER_FAUX_INSTANCES(faux_set, I) {
+		inter_package *pack = I->package;
+		@;
+		if (FauxInstances::is_a_room(I)) @;
+		if (FauxInstances::is_a_backdrop(I)) @;
+		if (FauxInstances::is_a_direction(I)) @;
+		if (FauxInstances::is_a_door(I)) @;
 	}
 
-	LOOP_OVER_FAUX_INSTANCES(faux_set, FI) {
-		FI->region_enclosing = FauxInstances::instance_metadata(faux_set, FI, I"^region_enclosing");
-		FI->object_tree_sibling = FauxInstances::instance_metadata(faux_set, FI, I"^sibling");
-		FI->object_tree_child = FauxInstances::instance_metadata(faux_set, FI, I"^child");
-		FI->progenitor = FauxInstances::instance_metadata(faux_set, FI, I"^progenitor");
-		FI->incorp_tree_sibling = FauxInstances::instance_metadata(faux_set, FI, I"^incorp_sibling");
-		FI->incorp_tree_child = FauxInstances::instance_metadata(faux_set, FI, I"^incorp_child");
-	}
-	faux_instance *FR;
-	LOOP_OVER_FAUX_DIRECTIONS(faux_set, FR)
-		FR->opposite_direction = FauxInstances::instance_metadata(faux_set, FR, I"^opposite_direction");
-	faux_instance *FD;
-	LOOP_OVER_FAUX_DOORS(faux_set, FD) {
-		FD->other_side = FauxInstances::instance_metadata(faux_set, FD, I"^other_side");
-		FD->fimd.map_connection_a = FauxInstances::instance_metadata(faux_set, FD, I"^side_a");
-		FD->fimd.map_connection_b = FauxInstances::instance_metadata(faux_set, FD, I"^side_b");
-	}
 	FauxInstances::decode_hints(faux_set, IT, 1);
 	return faux_set;
 }
 
-@
+@ =
+	faux_instance *I = FauxInstances::new(pack);
+	ADD_TO_LINKED_LIST(I, faux_instance, faux_set->instances);	
+	if (FauxInstances::is_a_direction(I)) I->direction_index = faux_set->no_direction_fi++;
+	if (FauxInstances::is_a_room(I)) faux_set->no_room_fi++;
+	if (Metadata::read_optional_numeric(pack, I"^is_yourself")) faux_set->faux_yourself = I;
+	if (Metadata::read_optional_numeric(pack, I"^is_benchmark_room")) faux_set->faux_benchmark = I;
+	if (Metadata::read_optional_numeric(pack, I"^is_start_room")) faux_set->start_faux_instance = I;
+
+@ =
+	I->region_enclosing = FauxInstances::xref(faux_set, I->package, I"^region_enclosing");
+	I->object_tree_sibling = FauxInstances::xref(faux_set, I->package, I"^sibling");
+	I->object_tree_child = FauxInstances::xref(faux_set, I->package, I"^child");
+	I->progenitor = FauxInstances::xref(faux_set, I->package, I"^progenitor");
+	I->incorp_tree_sibling = FauxInstances::xref(faux_set, I->package, I"^incorp_sibling");
+	I->incorp_tree_child = FauxInstances::xref(faux_set, I->package, I"^incorp_child");
+
+@ =
+	inter_tree_node *P = Metadata::read_optional_list(pack, I"^map");
+	if (P) {
+		for (int i=0; i= P->W.extent) break;
+			inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
+			if (v1 == ALIAS_IVAL) {
+				inter_symbol *S =
+					InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
+				if (S == NULL) internal_error("malformed map metadata");
+				I->fimd.exits[i] = FauxInstances::symbol_to_faux_instance(faux_set, S);
+			} else if ((v1 != LITERAL_IVAL) || (v2 != 0)) internal_error("malformed map metadata");
+			inter_ti v3 = P->W.data[offset+2], v4 = P->W.data[offset+3];
+			if (v3 != LITERAL_IVAL) internal_error("malformed map metadata");
+			if (v4) I->fimd.exits_set_at[i] = (int) v4;
+		}
+	}
+
+@ =
+	inter_tree_node *P = Metadata::read_optional_list(pack, I"^backdrop_presences");
+	if (P) {
+		int offset = DATA_CONST_IFLD;
+		while (offset < P->W.extent) {
+			inter_ti v1 = P->W.data[offset], v2 = P->W.data[offset+1];
+			if (v1 == ALIAS_IVAL) {
+				inter_symbol *S =
+					InterSymbolsTables::symbol_from_id(Inter::Packages::scope(pack), v2);
+				if (S == NULL) internal_error("malformed map metadata");
+				faux_instance *FL = FauxInstances::symbol_to_faux_instance(faux_set, S);
+				ADD_TO_LINKED_LIST(I, faux_instance, FL->backdrop_presences);
+			} else internal_error("malformed backdrop metadata");
+			offset += 2;
+		}
+	}
+
+@ =
+	I->opposite_direction = FauxInstances::xref(faux_set, I->package, I"^opposite_direction");
+
+@ =
+	I->other_side = FauxInstances::xref(faux_set, I->package, I"^other_side");
+	I->fimd.map_connection_a = FauxInstances::xref(faux_set, I->package, I"^side_a");
+	I->fimd.map_connection_b = FauxInstances::xref(faux_set, I->package, I"^side_b");
+
+@ When the Inter package for one instance wants to refer to another one, say
+with the key |other|, it does so by having a symbol |other| defined as the
+instance value of the other instance: so we first extract the symbol by looking
+|key| up in the first instance's package; then we can find the other instance
+package simply by finding the container-package for where |S| is defined.
+It is then a simple if not especially quick task to find which //faux_instance//
+was made from that package.
+
+=
+faux_instance *FauxInstances::xref(faux_instance_set *faux_set, inter_package *pack,
+	text_stream *key) {
+	return FauxInstances::symbol_to_faux_instance(faux_set,
+		Metadata::read_optional_symbol(pack, key));
+}
+
+faux_instance *FauxInstances::symbol_to_faux_instance(faux_instance_set *faux_set,
+	inter_symbol *S) {
+	if (S == NULL) return NULL;
+	inter_package *want = Inter::Packages::container(S->definition);
+	faux_instance *I;
+	LOOP_OVER_FAUX_INSTANCES(faux_set, I)
+		if (I->package == want)
+			return I;
+	return NULL;
+}
+
+@h Decoding map hints.
+Mapping hints arise from sentences like "Index with X mapped east of Y", or
+some other helpful tip: these are compiled fairly directly into Inter packages,
+and this is where we decode those packages and make use of them.
+
+This is done in two passes. |pass| 1 occurs when a new faux set of instances is
+being made; |pass| 2 only after the spatial grid layout has been calculated,
+and only if needed.
 
 =
 void FauxInstances::decode_hints(faux_instance_set *faux_set, inter_tree *I, int pass) {
@@ -251,39 +305,28 @@ void FauxInstances::decode_hints(faux_instance_set *faux_set, inter_tree *I, int
 		if (C->W.data[ID_IFLD] == PACKAGE_IST) {
 			inter_package *entry = Inter::Package::defined_by_frame(C);
 			if (Inter::Packages::type(entry) == wanted) {
-				faux_instance *from = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^from"));
-				faux_instance *to = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^to"));
-				faux_instance *dir = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^dir"));
-				faux_instance *as_dir = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^as_dir"));
+				faux_instance *from = FauxInstances::xref(faux_set, entry, I"^from");
+				faux_instance *to = FauxInstances::xref(faux_set, entry, I"^to");
+				faux_instance *dir = FauxInstances::xref(faux_set, entry, I"^dir");
+				faux_instance *as_dir = FauxInstances::xref(faux_set, entry, I"^as_dir");
 				if ((dir) && (as_dir)) {
-					if (pass == 1)
-						story_dir_to_page_dir[dir->direction_index] = as_dir->direction_index;
+					if (pass == 1) @;
 					continue;
 				}
 				if ((from) && (dir)) {
-					if (pass == 1)
-						PL::SpatialMap::lock_exit_in_place(from, dir->direction_index, to);
+					if (pass == 1) @;
 					continue;
 				}
 				text_stream *name = Metadata::read_optional_textual(entry, I"^name");
 				if (Str::len(name) > 0) {
 					int scope_level = (int) Metadata::read_optional_numeric(entry, I"^scope_level");
-					faux_instance *scope_I = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^scope_instance"));
+					faux_instance *scope_I = FauxInstances::xref(faux_set, entry, I"^scope_instance");
 					text_stream *text_val = Metadata::read_optional_textual(entry, I"^text");
 					int int_val = (int) Metadata::read_optional_numeric(entry, I"^number");
 					if (scope_level != 1000000) {
-						if (pass == 2) {
-							map_parameter_scope *scope = NULL;
-							EPS_map_level *eml;
-							LOOP_OVER(eml, EPS_map_level)
-								if ((eml->contains_rooms)
-									&& (eml->map_level - PL::SpatialMap::benchmark_level() == scope_level))
-									scope = &(eml->map_parameters);
-							if (scope) ConfigureIndexMap::put_mp(name, scope, scope_I, text_val, int_val);
-						}
+						if (pass == 2) @;
 					} else {
-						if (pass == 1)
-							ConfigureIndexMap::put_mp(name, NULL, scope_I, text_val, int_val);
+						if (pass == 1) @;
 					}
 					continue;
 				}
@@ -296,7 +339,8 @@ void FauxInstances::decode_hints(faux_instance_set *faux_set, inter_tree *I, int
 						rh->font = Metadata::read_optional_textual(entry, I"^font");
 						rh->colour = Metadata::read_optional_textual(entry, I"^colour");
 						rh->at_offset = (int) Metadata::read_optional_numeric(entry, I"^offset");
-						rh->offset_from = FauxInstances::fis(faux_set, Metadata::read_optional_symbol(entry, I"^offset_from"));
+						rh->offset_from = FauxInstances::xref(faux_set, entry, I"^offset_from");
+						ADD_TO_LINKED_LIST(rh, rubric_holder, faux_set->rubrics);	
 					}
 					continue;
 				}
@@ -305,23 +349,38 @@ void FauxInstances::decode_hints(faux_instance_set *faux_set, inter_tree *I, int
 	}
 }
 
-faux_instance *FauxInstances::instance_metadata(faux_instance_set *faux_set,
-	faux_instance *I, text_stream *key) {
-	if (I == NULL) return I;
-	inter_symbol *val_s = Metadata::read_optional_symbol(I->package, key);
-	return FauxInstances::fis(faux_set, val_s);
-}
+@ For instance, for "starboard" to be mapped as if "east":
 
-faux_instance *FauxInstances::fis(faux_instance_set *faux_set, inter_symbol *S) {
-	if (S == NULL) return NULL;
-	inter_package *want = Inter::Packages::container(S->definition);
-	faux_instance *FI;
-	LOOP_OVER_FAUX_INSTANCES(faux_set, FI)
-		if (FI->package == want)
-			return FI;
-	return NULL;
-}
+@ =
+	story_dir_to_page_dir[dir->direction_index] = as_dir->direction_index;
 
+@ For instance, for the East Room to be mapped east of the Grand Lobby:
+
+@ =
+	PL::SpatialMap::lock_exit_in_place(from, dir->direction_index, to);
+
+@ Most map parameters (e.g. setting room colours or font sizes) can be set
+immediately, i.e., on |pass| 1:
+
+@ =
+	ConfigureIndexMap::put_mp(name, NULL, scope_I, text_val, int_val);
+
+@ ...but not those hints applying to a specific level of the map (e.g., level 4),
+since we do not initially know what level any given room actually lives on: that
+can only be known once the spatial grid has been found, i.e., on |pass| 2.
+
+@ =
+	map_parameter_scope *scope = NULL;
+	EPS_map_level *eml;
+	LOOP_OVER(eml, EPS_map_level)
+		if ((eml->contains_rooms)
+			&& (eml->map_level - PL::SpatialMap::benchmark_level() == scope_level))
+			scope = &(eml->map_parameters);
+	if (scope) ConfigureIndexMap::put_mp(name, scope, scope_I, text_val, int_val);
+
+@h Instance set properties.
+
+=
 faux_instance *FauxInstances::start_room(void) {
 	faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
 	return faux_set->start_faux_instance;
@@ -337,10 +396,7 @@ faux_instance *FauxInstances::benchmark(void) {
 	return faux_set->faux_benchmark;
 }
 
-@
-
-=
-
+@ =
 int FauxInstances::no_directions(void) {
 	faux_instance_set *faux_set = InterpretIndex::get_faux_instances();
 	return faux_set->no_direction_fi;
@@ -351,7 +407,7 @@ int FauxInstances::no_rooms(void) {
 	return faux_set->no_room_fi;
 }
 
-@h Naming.
+@h Individual instance properties.
 
 =
 text_stream *FauxInstances::get_name(faux_instance *I) {
@@ -371,151 +427,152 @@ void FauxInstances::write_kind_chain(OUTPUT_STREAM, faux_instance *I) {
 	WRITE("%S", I->kind_chain);
 }
 
-faux_instance *FauxInstances::region_of(faux_instance *FI) {
-	if (FI == NULL) return NULL;
-	return FI->region_enclosing;
+faux_instance *FauxInstances::region_of(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->region_enclosing;
 }
 
-faux_instance *FauxInstances::opposite_direction(faux_instance *FR) {
-	if (FR == NULL) return NULL;
-	return FR->opposite_direction;
+faux_instance *FauxInstances::opposite_direction(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->opposite_direction;
 }
 
-faux_instance *FauxInstances::other_side_of_door(faux_instance *FR) {
-	if (FR == NULL) return NULL;
-	return FR->other_side;
+faux_instance *FauxInstances::other_side_of_door(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->other_side;
 }
 
-faux_instance *FauxInstances::sibling(faux_instance *FR) {
-	if (FR == NULL) return NULL;
-	return FR->object_tree_sibling;
+faux_instance *FauxInstances::sibling(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->object_tree_sibling;
 }
 
-faux_instance *FauxInstances::child(faux_instance *FR) {
-	if (FR == NULL) return NULL;
-	return FR->object_tree_child;
+faux_instance *FauxInstances::child(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->object_tree_child;
 }
 
-faux_instance *FauxInstances::progenitor(faux_instance *FR) {
-	if (FR == NULL) return NULL;
-	return FR->progenitor;
+faux_instance *FauxInstances::progenitor(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->progenitor;
 }
 
-faux_instance *FauxInstances::incorp_child(faux_instance *FR) {
-	if (FR == NULL) return NULL;
-	return FR->incorp_tree_child;
+faux_instance *FauxInstances::incorp_child(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->incorp_tree_child;
 }
 
-faux_instance *FauxInstances::incorp_sibling(faux_instance *FR) {
-	if (FR == NULL) return NULL;
-	return FR->incorp_tree_sibling;
+faux_instance *FauxInstances::incorp_sibling(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return I->incorp_tree_sibling;
 }
 
-int FauxInstances::is_a_direction(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_direction")) return TRUE;
+int FauxInstances::is_a_direction(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_direction")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_room(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_room")) return TRUE;
+int FauxInstances::is_a_room(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_room")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_door(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_door")) return TRUE;
+int FauxInstances::is_a_door(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_door")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_region(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_region")) return TRUE;
+int FauxInstances::is_a_region(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_region")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_backdrop(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_backdrop")) return TRUE;
+int FauxInstances::is_a_backdrop(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_backdrop")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_thing(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_thing")) return TRUE;
+int FauxInstances::is_a_thing(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_thing")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_supporter(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_supporter")) return TRUE;
+int FauxInstances::is_a_supporter(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_supporter")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_person(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_person")) return TRUE;
+int FauxInstances::is_a_person(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_person")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_worn(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_worn")) return TRUE;
+int FauxInstances::is_worn(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_worn")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_everywhere(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_everywhere")) return TRUE;
+int FauxInstances::is_everywhere(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_everywhere")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::is_a_part(faux_instance *FR) {
-	if (FR == NULL) return FALSE;
-	if (Metadata::read_optional_numeric(FR->package, I"^is_a_part")) return TRUE;
+int FauxInstances::is_a_part(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Metadata::read_optional_numeric(I->package, I"^is_a_part")) return TRUE;
 	return FALSE;
 }
 
-int FauxInstances::created_at(faux_instance *FR) {
-	if (FR == NULL) return -1;
-	return (int) Metadata::read_optional_numeric(FR->package,  I"^at");
+int FauxInstances::created_at(faux_instance *I) {
+	if (I == NULL) return -1;
+	return (int) Metadata::read_optional_numeric(I->package,  I"^at");
 }
 
-int FauxInstances::kind_set_at(faux_instance *FR) {
-	if (FR == NULL) return -1;
-	return (int) Metadata::read_optional_numeric(FR->package,  I"^kind_set_at");
+int FauxInstances::kind_set_at(faux_instance *I) {
+	if (I == NULL) return -1;
+	return (int) Metadata::read_optional_numeric(I->package,  I"^kind_set_at");
 }
 
-int FauxInstances::progenitor_set_at(faux_instance *FR) {
-	if (FR == NULL) return -1;
-	return (int) Metadata::read_optional_numeric(FR->package,  I"^progenitor_set_at");
+int FauxInstances::progenitor_set_at(faux_instance *I) {
+	if (I == NULL) return -1;
+	return (int) Metadata::read_optional_numeric(I->package,  I"^progenitor_set_at");
 }
 
-int FauxInstances::region_set_at(faux_instance *FR) {
-	if (FR == NULL) return -1;
-	return (int) Metadata::read_optional_numeric(FR->package,  I"^region_set_at");
+int FauxInstances::region_set_at(faux_instance *I) {
+	if (I == NULL) return -1;
+	return (int) Metadata::read_optional_numeric(I->package,  I"^region_set_at");
 }
 
-void FauxInstances::get_door_data(faux_instance *door, faux_instance **c1, faux_instance **c2) {
+void FauxInstances::get_door_data(faux_instance *door,
+	faux_instance **c1, faux_instance **c2) {
 	if (c1) *c1 = door->fimd.map_connection_a;
 	if (c2) *c2 = door->fimd.map_connection_b;
 }
 
-map_parameter_scope *FauxInstances::get_parameters(faux_instance *R) {
-	if (R == NULL) return NULL;
-	return &(R->fimd.local_map_parameters);
+map_parameter_scope *FauxInstances::get_parameters(faux_instance *I) {
+	if (I == NULL) return NULL;
+	return &(I->fimd.local_map_parameters);
 }
 
-int FauxInstances::specify_kind(faux_instance *FI) {
-	if (FI == NULL) return FALSE;
-	if (Str::eq(FI->kind_text, I"thing")) return FALSE;
-	if (Str::eq(FI->kind_text, I"room")) return FALSE;
+int FauxInstances::specify_kind(faux_instance *I) {
+	if (I == NULL) return FALSE;
+	if (Str::eq(I->kind_text, I"thing")) return FALSE;
+	if (Str::eq(I->kind_text, I"room")) return FALSE;
 	return TRUE;
 }
 
-@h Noun usage.
-This simply avoids repetitions in the World index:
+@h Appearance counts.
+This code simply avoids repetitions in the World index:
 
 =
 void FauxInstances::increment_indexing_count(faux_instance *I) {
diff --git a/inter/index-module/Chapter 4/Render EPS Map.w b/inter/index-module/Chapter 4/Render EPS Map.w
index a45f58dea..610c65175 100644
--- a/inter/index-module/Chapter 4/Render EPS Map.w	
+++ b/inter/index-module/Chapter 4/Render EPS Map.w	
@@ -308,7 +308,7 @@ actually go there in any visual way.
 
 @ =
 	rubric_holder *rh;
-	LOOP_OVER(rh, rubric_holder) {
+	LOOP_OVER_LINKED_LIST(rh, rubric_holder, faux_set->rubrics) {
 		int bx = 0, by = 0;
 		int xpart = rh->at_offset%10000, ypart = rh->at_offset/10000;
 		int mapunit = ConfigureIndexMap::get_int_mp(I"grid-size", NULL);