diff --git a/docs/assertions-module/4-ass.html b/docs/assertions-module/4-ass.html index f2dc05e9f..2baf3fe4f 100644 --- a/docs/assertions-module/4-ass.html +++ b/docs/assertions-module/4-ass.html @@ -1389,8 +1389,8 @@ in this case.
     #ifdef IF_MODULE
-    if ((PL::MapDirections::get_mapping_relationship(px)) &&
-        (PL::MapDirections::get_mapping_relationship(py))) {
+    if ((MapRelations::get_mapping_relationship(px)) &&
+        (MapRelations::get_mapping_relationship(py))) {
         Map::enter_one_way_mode();
         Assertions::make_coupling(px, py->down);
         Assertions::make_coupling(px->down, py);
diff --git a/docs/assertions-module/4-rk.html b/docs/assertions-module/4-rk.html
index 601bea3e0..cc6ba5ad3 100644
--- a/docs/assertions-module/4-rk.html
+++ b/docs/assertions-module/4-rk.html
@@ -107,7 +107,7 @@ objects or values, but there are two exceptional cases to take care of.
         return;
     }
     #ifdef IF_MODULE
-    if (PL::MapDirections::get_mapping_relationship(relationship_subtree))
+    if (MapRelations::get_mapping_relationship(relationship_subtree))
         Exceptional relationship nodes for map connections1.3;
     pronoun_usage *pro = Node::get_pronoun(relationship_subtree->down);
     if ((pro) && (pro->pronoun_used == here_pronoun))
diff --git a/docs/assertions-module/4-rpt.html b/docs/assertions-module/4-rpt.html
index 1594673c7..aa1cc90a3 100644
--- a/docs/assertions-module/4-rpt.html
+++ b/docs/assertions-module/4-rpt.html
@@ -498,7 +498,7 @@ has the marble and the box as its children, the relationship being containment.
     if (p->down) {
         Refiner::refine(p->down, creation_rule);
         #ifdef IF_MODULE
-        instance *dir = PL::MapDirections::get_mapping_relationship(p);
+        instance *dir = MapRelations::get_mapping_relationship(p);
         if (dir) Make the relation one which refers to a map direction11.5.1;
         #endif
         if (p->down->next) Refiner::refine(p->down->next, creation_rule);
diff --git a/docs/core-module/1-cp.html b/docs/core-module/1-cp.html
index 70262bb75..00971d3da 100644
--- a/docs/core-module/1-cp.html
+++ b/docs/core-module/1-cp.html
@@ -287,18 +287,24 @@ We begin with core itself.
 

§7. index

-
enum contents_entry_CLASS
+
enum connected_submap_CLASS
+enum contents_entry_CLASS
 enum documentation_ref_CLASS
+enum EPS_map_level_CLASS
 enum index_page_CLASS
 enum index_element_CLASS
 enum index_lexicon_entry_CLASS
+enum rubric_holder_CLASS
 
+DECLARE_CLASS(connected_submap)
 DECLARE_CLASS(contents_entry)
 DECLARE_CLASS(documentation_ref)
+DECLARE_CLASS(EPS_map_level)
 DECLARE_CLASS(index_element)
 DECLARE_CLASS(index_page)
 DECLARE_CLASS(index_lexicon_entry)
+DECLARE_CLASS(rubric_holder)
 

§8. if

@@ -307,9 +313,7 @@ We begin with core itself. enum auxiliary_file_CLASS enum cached_understanding_CLASS enum command_index_entry_CLASS -enum connected_submap_CLASS enum direction_inference_data_CLASS -enum EPS_map_level_CLASS enum found_in_inference_data_CLASS enum grammar_line_CLASS enum grammar_verb_CLASS @@ -326,7 +330,6 @@ We begin with core itself. enum regions_data_CLASS enum release_instructions_CLASS enum reserved_command_verb_CLASS -enum rubric_holder_CLASS enum scene_CLASS enum slash_gpr_CLASS enum spatial_data_CLASS @@ -342,9 +345,7 @@ We begin with core itself. DECLARE_CLASS(auxiliary_file) DECLARE_CLASS(cached_understanding) DECLARE_CLASS(command_index_entry) -DECLARE_CLASS(connected_submap) DECLARE_CLASS(direction_inference_data) -DECLARE_CLASS(EPS_map_level) DECLARE_CLASS(found_in_inference_data) DECLARE_CLASS(grammar_line) DECLARE_CLASS(grammar_verb) @@ -361,7 +362,6 @@ We begin with core itself. DECLARE_CLASS(regions_data) DECLARE_CLASS(release_instructions) DECLARE_CLASS(reserved_command_verb) -DECLARE_CLASS(rubric_holder) DECLARE_CLASS(scene) DECLARE_CLASS(slash_gpr) DECLARE_CLASS(spatial_data) diff --git a/docs/if-module/1-im.html b/docs/if-module/1-im.html index 1c26bbd04..1403b084d 100644 --- a/docs/if-module/1-im.html +++ b/docs/if-module/1-im.html @@ -96,7 +96,7 @@ function togglePopup(material_id) { ReleaseInstructions::start(); WherePredicates::start(); SpatialRelations::start(); - PL::MapDirections::start(); + MapRelations::start(); }

§2.1.

@@ -165,19 +165,19 @@ nothing except to be a parent to them; it has no activation function. backdrops_plugin = PluginManager::new(&Backdrops::start, I"backdrops", ifp); bibliographic_plugin = PluginManager::new(&BibliographicData::start, I"bibliographic data", ifp); chronology_plugin = PluginManager::new(&Chronology::start_plugin, I"chronology", ifp); - devices_plugin = PluginManager::new(&PL::Devices::start, I"devices", ifp); + devices_plugin = PluginManager::new(&PL::Devices::start, I"devices", ifp); map_plugin = PluginManager::new(&Map::start, I"mapping", ifp); persons_plugin = PluginManager::new(&PL::Persons::start, I"persons", ifp); player_plugin = PluginManager::new(&Player::start, I"player", ifp); regions_plugin = PluginManager::new(&Regions::start, I"regions", ifp); - scenes_plugin = PluginManager::new(&PL::Scenes::start, I"scenes", ifp); - scoring_plugin = PluginManager::new(&PL::Score::start, I"scoring", ifp); - showme_plugin = PluginManager::new(&PL::Showme::start, I"showme", ifp); + scenes_plugin = PluginManager::new(&Scenes::start, I"scenes", ifp); + scoring_plugin = PluginManager::new(&TheScore::start, I"scoring", ifp); times_plugin = PluginManager::new(TimesOfDay::start, I"times of day", ifp); actions_plugin = PluginManager::new(&ActionsPlugin::start, I"actions", ifp); parsing_plugin = PluginManager::new(&ParsingPlugin::start, I"command", ifp); + showme_plugin = PluginManager::new(&RTShowmeCommand::start, I"showme", parsing_plugin); }
diff --git a/docs/if-module/3-dvc.html b/docs/if-module/3-dvc.html index 7150168e9..6ce846a51 100644 --- a/docs/if-module/3-dvc.html +++ b/docs/if-module/3-dvc.html @@ -79,15 +79,13 @@ Rules in a clumsy sort of way (with a direct I6 code injection), but in the age of Inter we want to avoid that sort of tomfoolery.

-

§2.

-
 void PL::Devices::start(void) {
-    PluginManager::plug(NEW_BASE_KIND_NOTIFY_PLUG, PL::Devices::new_base_kind_notify);
-    PluginManager::plug(COMPLETE_MODEL_PLUG, PL::Devices::IF_complete_model);
+    PluginManager::plug(NEW_BASE_KIND_NOTIFY_PLUG, PL::Devices::new_base_kind_notify);
+    PluginManager::plug(COMPLETE_MODEL_PLUG, PL::Devices::IF_complete_model);
 }
 
-

§3. As usual with notable kinds, this is recognised by its English name, so there +

§2. As usual with notable kinds, this is recognised by its English name, so there is no need to translate this.

@@ -96,16 +94,16 @@ is no need to translate this. device -

§4.

+

§3.

 kind *K_device = NULL;
-int PL::Devices::new_base_kind_notify(kind *new_base, text_stream *name, wording W) {
+int PL::Devices::new_base_kind_notify(kind *new_base, text_stream *name, wording W) {
     if (<notable-device-kinds>(W)) { K_device = new_base; return TRUE; }
     return FALSE;
 }
 
-int PL::Devices::IF_complete_model(int stage) {
+int PL::Devices::IF_complete_model(int stage) {
     if (stage == WORLD_STAGE_III) {
         property *P_switchable = EitherOrProperties::new_nameless(L"switchable");
         RTProperties::implement_as_attribute(P_switchable, TRUE);
@@ -119,7 +117,7 @@ is no need to translate this.
 }
 
diff --git a/docs/if-module/3-enah.html b/docs/if-module/3-enah.html index 5686fc309..872e9668b 100644 --- a/docs/if-module/3-enah.html +++ b/docs/if-module/3-enah.html @@ -304,7 +304,7 @@ and put the issue aside for now. } diff --git a/docs/if-module/3-mcr.html b/docs/if-module/3-mcr.html index 2b1d9ed2a..6ef9b9804 100644 --- a/docs/if-module/3-mcr.html +++ b/docs/if-module/3-mcr.html @@ -87,12 +87,12 @@ Metro" tests the "mapped-north" BP.
 bp_family *map_connecting_bp_family = NULL;
 
-void PL::MapDirections::start(void) {
+void MapRelations::start(void) {
     map_connecting_bp_family = BinaryPredicateFamilies::new();
-    METHOD_ADD(map_connecting_bp_family, TYPECHECK_BPF_MTID, PL::MapDirections::typecheck);
-    METHOD_ADD(map_connecting_bp_family, ASSERT_BPF_MTID, PL::MapDirections::assert);
+    METHOD_ADD(map_connecting_bp_family, TYPECHECK_BPF_MTID, MapRelations::typecheck);
+    METHOD_ADD(map_connecting_bp_family, ASSERT_BPF_MTID, MapRelations::assert);
     METHOD_ADD(map_connecting_bp_family, DESCRIBE_FOR_INDEX_BPF_MTID,
-        PL::MapDirections::describe_for_index);
+        MapRelations::describe_for_index);
 }
 

§2. Subsequent creations. Every direction created has a relation associated with it: for instance, @@ -103,7 +103,7 @@ at an earlier stage in Inform's run, so another two-step is needed:

-binary_predicate *PL::MapDirections::create_sketchy_mapping_direction(wording W) {
+binary_predicate *MapRelations::create_sketchy_mapping_direction(wording W) {
     binary_predicate *bp;
     Create the mapping BP for the new direction2.3;
     return bp;
@@ -122,7 +122,7 @@ is done to avoid ambiguities with the already-existing meanings of inside
 and outside to do with spatial containment.
 

-

The use of the word "mapped" may seem itself off. Why define "to be mapped +

The use of the word "mapped" may seem itself odd. Why define "to be mapped east of" rather than "to be east of"? After all, that seems to be what is used in assertions like:

@@ -131,8 +131,8 @@ used in assertions like:

The Bakery is east of Pudding Lane.

-

In fact, the A-parser reads sentences like that by looking out specially for -direction names plus "of" — so this is parsed without using the mapping +

In fact, the assertion parser reads sentences like that by looking out specially +for direction names plus "of" — so this is parsed without using the mapping predicate for "east". But it cannot read:

@@ -144,14 +144,6 @@ predicate for "east". But it cannot read: "down", and anyway there is no "of".

-

We do not allow direction names with unexpected capital letters because we -want to allow room names to contain direction names on occasion: -

- -
-

The fire hydrant is in West from 47th Street.

-
-
 <mapping-relation-construction> ::=
     mapping ...
@@ -229,7 +221,7 @@ makes it possible to complete the details of the BP.
 
 
 int mmp_call_counter = 0;
-void PL::MapDirections::make_mapped_predicate(instance *I) {
+void MapRelations::make_mapped_predicate(instance *I) {
     wording W = Instances::get_name(I, FALSE);
     if ((Wordings::empty(W)) || (Wordings::length(W) > MAX_WORDS_IN_DIRECTION))
         internal_error("bad direction name");
@@ -258,7 +250,7 @@ remaining anomalies.
 

-int PL::MapDirections::typecheck(bp_family *self, binary_predicate *bp,
+int MapRelations::typecheck(bp_family *self, binary_predicate *bp,
         kind **kinds_of_terms, kind **kinds_required, tc_problem_kit *tck) {
     int t;
     for (t=0; t<2; t++)
@@ -280,10 +272,10 @@ such.
 

-int PL::MapDirections::assert(bp_family *self, binary_predicate *bp,
+int MapRelations::assert(bp_family *self, binary_predicate *bp,
         inference_subject *infs0, parse_node *spec0,
         inference_subject *infs1, parse_node *spec1) {
-    instance *o_dir = PL::MapDirections::get_mapping_direction(bp);
+    instance *o_dir = MapRelations::get_mapping_direction(bp);
     inference_subject *infs_from = infs0;
     inference_subject *infs_to = infs1;
 
@@ -297,7 +289,7 @@ such.
 

§6. Indexing.

-void PL::MapDirections::describe_for_index(bp_family *self, OUTPUT_STREAM,
+void MapRelations::describe_for_index(bp_family *self, OUTPUT_STREAM,
     binary_predicate *bp) {
     WRITE("map");
 }
@@ -306,12 +298,12 @@ such.
 

-binary_predicate *PL::MapDirections::get_mapping_relation(instance *dir) {
+binary_predicate *MapRelations::get_mapping_relation(instance *dir) {
     if (dir == NULL) return NULL;
     return MAP_DATA(dir)->direction_relation;
 }
 
-instance *PL::MapDirections::get_mapping_direction(binary_predicate *bp) {
+instance *MapRelations::get_mapping_direction(binary_predicate *bp) {
     if (bp == NULL) return NULL;
     instance *I;
     LOOP_OVER_INSTANCES(I, K_object)
@@ -320,12 +312,12 @@ such.
     return NULL;
 }
 
-instance *PL::MapDirections::get_mapping_relationship(parse_node *p) {
+instance *MapRelations::get_mapping_relationship(parse_node *p) {
     binary_predicate *bp = Node::get_relationship(p);
     if ((bp) && (PluginManager::active(map_plugin))) {
-        instance *dir = PL::MapDirections::get_mapping_direction(
+        instance *dir = MapRelations::get_mapping_direction(
             BinaryPredicates::get_reversal(bp));
-        if (dir == NULL) dir = PL::MapDirections::get_mapping_direction(bp);
+        if (dir == NULL) dir = MapRelations::get_mapping_direction(bp);
         return dir;
     }
     return NULL;
@@ -335,7 +327,7 @@ such.
 

-void PL::MapDirections::create_relations(void) {
+void MapRelations::create_relations(void) {
     BinaryPredicates::make_pair(spatial_bp_family,
         BPTerms::new(infs_room),
         BPTerms::new(infs_room),
@@ -345,7 +337,7 @@ such.
 }
 
diff --git a/docs/if-module/3-prs.html b/docs/if-module/3-prs.html index 8f3800580..8b8bbfa90 100644 --- a/docs/if-module/3-prs.html +++ b/docs/if-module/3-prs.html @@ -102,7 +102,7 @@ tomfoolery. }
diff --git a/docs/if-module/3-rgn.html b/docs/if-module/3-rgn.html index 8c39b9b6d..c0b0839c5 100644 --- a/docs/if-module/3-rgn.html +++ b/docs/if-module/3-rgn.html @@ -165,7 +165,7 @@ region is either the next broadest region containing it, or else -instance *Regions::enclosing(instance *reg) { +instance *Regions::enclosing(instance *reg) { instance *P = NULL; if (Spatial::object_is_a_room(reg)) P = REGIONS_DATA(reg)->in_region; if (Regions::object_is_a_region(reg)) P = Spatial::progenitor(reg); @@ -180,7 +180,7 @@ domains.)

-int Regions::more_specific(instance *I1, instance *I2) {
+int Regions::more_specific(instance *I1, instance *I2) {
     int r1 = Instances::of_kind(I1, K_room);
     int r2 = Instances::of_kind(I2, K_room);
     int reg1 = Instances::of_kind(I1, K_region);
@@ -199,7 +199,7 @@ domains.)
 

-int Regions::object_is_a_region(instance *I) {
+int Regions::object_is_a_region(instance *I) {
     if ((K_region) && (I) && (Instances::of_kind(I, K_region))) return TRUE;
     return FALSE;
 }
@@ -219,7 +219,7 @@ following minimal structure, though it will only be relevant for instances of
     CLASS_DEFINITION
 } regions_data;
 
-int Regions::new_subject_notify(inference_subject *subj) {
+int Regions::new_subject_notify(inference_subject *subj) {
     regions_data *rd = CREATE(regions_data);
     rd->in_region = NULL;
     rd->in_region_set_at = NULL;
@@ -243,7 +243,7 @@ Standard Rules. (So there is no need to translate this to other languages.)
 
 
 property *P_map_region = NULL;  a value property giving the region of a room
-int Regions::new_property_notify(property *prn) {
+int Regions::new_property_notify(property *prn) {
     if (<notable-regions-properties>(prn->name))
         P_map_region = prn;
     return FALSE;
@@ -254,7 +254,7 @@ messages which would have been less helpful if core Inform had produced them.
 

-int Regions::intervene_in_assertion(parse_node *px, parse_node *py) {
+int Regions::intervene_in_assertion(parse_node *px, parse_node *py) {
     if ((Node::get_type(px) == PROPER_NOUN_NT) &&
         (Node::get_type(py) == COMMON_NOUN_NT)) {
         inference_subject *left_subject = Node::get_subject(px);
@@ -296,7 +296,7 @@ messages which would have been less helpful if core Inform had produced them.
 

-int Regions::complete_model(int stage) {
+int Regions::complete_model(int stage) {
     if (stage == WORLD_STAGE_II) Assert map-region properties of rooms and regions14.1;
     if (stage == WORLD_STAGE_III) Assert regional-found-in properties of regions14.2;
     return FALSE;
@@ -354,7 +354,7 @@ define it separately, even though there's no difference in English syntax. So:
 

§16.

-void Regions::create_relations(void) {
+void Regions::create_relations(void) {
     R_regional_containment =
         BinaryPredicates::make_pair(spatial_bp_family,
             BPTerms::new(infs_region),
@@ -373,7 +373,7 @@ to participate in nonspatial relations.)
 

-int Regions::assert_relations(binary_predicate *relation,
+int Regions::assert_relations(binary_predicate *relation,
     instance *I0, instance *I1) {
     int I0_is_region = FALSE;
     if (Instances::of_kind(I0, K_region)) I0_is_region = TRUE;
@@ -450,7 +450,7 @@ to be a region already:
 
  • This code is used in §17.
diff --git a/docs/if-module/3-scn.html b/docs/if-module/3-scn.html index a16fca6c6..ceae6564f 100644 --- a/docs/if-module/3-scn.html +++ b/docs/if-module/3-scn.html @@ -71,116 +71,37 @@ function togglePopup(material_id) { -

Scenes are periods of time during play: at any given moment, several may be going on, or none. They are started and stopped when certain conditions are met, or by virtue of having been anchored together.

+

A plugin to support named periods of time during an interactive story.

-
+
-

§1. Scenes are gated intervals of time, but there are more than two gates: for -while there is only one past, there are many possible futures. These gates -are called "ends" in the code below, and are numbered end 0 (the beginning), -end 1 (the usual end), and then any named ends ("ends badly" or "ends -triumphantly", for instance, might be ends 2 and 3). Each end has a condition -which can cause it, or can be "anchored" to any number of ends of other -scenes — to express which, the scene_connector structure is used. -

- -
define MAX_SCENE_ENDS 32  this must exceed 31
-
-
-typedef struct scene_connector {
-    struct scene *connect_to;  scene connected to
-    int end;  end number: see above
-    struct scene_connector *next;  next in list of connectors for a scene end
-    struct parse_node *where_said;  where this linkage was specified in source
-} scene_connector;
-
-typedef struct scene {
-    struct instance *as_instance;  the constant for the name of the scene
-    int once_only;  cannot repeat during play
-    int start_of_play;  if begins when play begins
-    int marker;  used to detect potentially infinite recursion when scene changes occur
-    int no_ends;  how many ends the scene has
-    struct wording end_names[MAX_SCENE_ENDS];  for ends 2, 3, ...: e.g. "badly"
-    struct rulebook *end_rulebook[MAX_SCENE_ENDS];  rules to apply then
-    struct parse_node *anchor_condition[MAX_SCENE_ENDS];
-    struct scene_connector *anchor_scene[MAX_SCENE_ENDS];  linked list
-    int indexed;  temporary storage during Scenes index creation
-    struct parse_node *scene_declared_at;  where defined
-    struct parse_node *anchor_condition_set[MAX_SCENE_ENDS];  where set
-    CLASS_DEFINITION
-} scene;
-
-
  • The structure scene_connector is accessed in 2/ri, 3/tm, 3/em, 3/tm2, 3/ts, 4/act, 4/anl, 4/ap2, 4/nap, 5/tfg, 5/gl and here.
  • The structure scene is accessed in 3/tm2 and here.
-

§2.

- -
define scenes_data scene
-define SCENES_DATA(subj) PLUGIN_DATA_ON_SUBJECT(scenes, subj)
-
-

§3. The following either/or property needs some compiler support: +

§1. Introduction. Scenes are periods of time during play: at any given moment, several may be +going on, or none. They are started and stopped when certain conditions are +met, or by virtue of having been anchored together. All of this takes compiler +support: unlike most of the plugins in the if module, this one code-generates +to non-trivial functions as well as tables of data.

-property *P_recurring = NULL;
-
-

§4. And so does the one special scene: -

+void Scenes::start(void) { + Scenes::declare_annotations(); + PluginManager::plug(PRODUCTION_LINE_PLUG, Scenes::production_line); + PluginManager::plug(NEW_PROPERTY_NOTIFY_PLUG, Scenes::new_property_notify); + PluginManager::plug(NEW_INSTANCE_NOTIFY_PLUG, Scenes::new_named_instance_notify); + PluginManager::plug(NEW_BASE_KIND_NOTIFY_PLUG, Scenes::new_base_kind_notify); + PluginManager::plug(MAKE_SPECIAL_MEANINGS_PLUG, Scenes::make_special_meanings); +} -
-scene *SC_entire_game = NULL;
-
-

§5. Scenes are similarly numbered and stored in their own kind: -actually, they are for practical purposes a built-in enumeration kind. -

- -
-kind *K_scene = NULL;
-
-

§6. At run-time, we need to store information about the current state of each -scene: whether it is currently playing or not, when the last change occurred, -and so on. This data is stored in I6 arrays as follows: -

- -

First, each scene has a unique ID number, used as an index X to these arrays. -This ID number is what is stored as an I6 value for the kind of value scene, -and it agrees with the allocation ID for the I7 scene structure. -

- -

scene_status-->X is 0 if the scene is not playing, but may do so in future; -1 if the scene is playing; or 2 if the scene is not playing and will never -play again. -

- -

scene_started-->X is the value of the_time when the scene last started, -or 0 if it has never started. -

- -

scene_ended-->X is the value of the_time when the scene last ended, -or 0 if it has never ended. (The "starting" end does not count as ending -for this purpose.) -

- -

scene_endings-->X is a bitmap recording which ends have been used, -including bit 1 which records whether the scene has started. -

- -

scene_latest_ending-->X holds the end number of the most recent ending -(or 0 if the scene has never ended). -

- -

§7. Plugin calls.

- -
-void PL::Scenes::start(void) {
-    PL::Scenes::declare_annotations();
-    PL::Scenes::grant_annotation_permissions();
-    PluginManager::plug(MAKE_SPECIAL_MEANINGS_PLUG, PL::Scenes::make_special_meanings);
-    PluginManager::plug(NEW_PROPERTY_NOTIFY_PLUG, PL::Scenes::scenes_new_property_notify);
-    PluginManager::plug(NEW_INSTANCE_NOTIFY_PLUG, PL::Scenes::scenes_new_named_instance_notify);
-    PluginManager::plug(NEW_BASE_KIND_NOTIFY_PLUG, PL::Scenes::scenes_new_base_kind_notify);
-    PluginManager::plug(PRODUCTION_LINE_PLUG, PL::Scenes::production_line);
+int Scenes::production_line(int stage, int debugging,
+    stopwatch_timer *sequence_timer) {
+    if (stage == INTER1_CSEQ) {
+        BENCH(RTScenes::DetectSceneChange_routine);
+        BENCH(RTScenes::ShowSceneStatus_routine);
+    }
+    return FALSE;
 }
 
-

§8. And these annotations to the syntax tree: +

§2. This plugin needs one extra syntax tree annotation:

enum constant_scene_ANNOT  scene: for constant values
@@ -188,54 +109,58 @@ including bit 1 which records whether the scene has started.
 
 DECLARE_ANNOTATION_FUNCTIONS(constant_scene, scene)
 
-

§9.

+

§3.

 MAKE_ANNOTATION_FUNCTIONS(constant_scene, scene)
-
-

§10.

-
-void PL::Scenes::declare_annotations(void) {
-    Annotations::declare_type(constant_scene_ANNOT, PL::Scenes::write_constant_scene_ANNOT);
+void Scenes::declare_annotations(void) {
+    Annotations::declare_type(constant_scene_ANNOT, Scenes::write_constant_scene_ANNOT);
+    Annotations::allow(CONSTANT_NT, constant_scene_ANNOT);
 }
-void PL::Scenes::write_constant_scene_ANNOT(text_stream *OUT, parse_node *p) {
+void Scenes::write_constant_scene_ANNOT(text_stream *OUT, parse_node *p) {
     if (Node::get_constant_scene(p))
         WRITE(" {scene: %I}", Node::get_constant_scene(p)->as_instance);
 }
-
-void PL::Scenes::grant_annotation_permissions(void) {
-    Annotations::allow(CONSTANT_NT, constant_scene_ANNOT);
-}
-
-
-int PL::Scenes::production_line(int stage, int debugging,
-    stopwatch_timer *sequence_timer) {
-    if (stage == INTER1_CSEQ) {
-        BENCH(PL::Scenes::DetectSceneChange_routine);
-        BENCH(PL::Scenes::ShowSceneStatus_routine);
-    }
-    return FALSE;
-}
-
-int PL::Scenes::make_special_meanings(void) {
-    SpecialMeanings::declare(PL::Scenes::begins_when_SMF, I"scene-begins-when", 1);
-    SpecialMeanings::declare(PL::Scenes::ends_when_SMF, I"scene-ends-when", 1);
-    return FALSE;
-}
 
-

§11. To detect "scene" and "recurring": +

§4. Scenes are the instances of a built-in enumeration kind, created by a +Neptune file belonging to WorldModelKit, and this is recognised by its +Inter identifier SCENE_TY.

-int PL::Scenes::scenes_new_base_kind_notify(kind *new_base, text_stream *name, wording W) {
+kind *K_scene = NULL;
+
+

§5.

+ +
+int Scenes::new_base_kind_notify(kind *new_base, text_stream *name, wording W) {
     if (Str::eq_wide_string(name, L"SCENE_TY")) {
         K_scene = new_base; return TRUE;
     }
     return FALSE;
 }
 
-

§12. This is a property name to do with scenes which Inform provides special +

§6. scene structures are automatically created whenever a new instance of the +kind "scene" is created, and this is where that happens. +

+ +
+int Scenes::new_named_instance_notify(instance *I) {
+    if ((K_scene) && (Kinds::eq(Instances::to_kind(I), K_scene))) {
+        Scenes::new_scene(I);
+        return TRUE;
+    }
+    return FALSE;
+}
+
+

§7. The following either/or property needs some compiler support: +

+ +
+property *P_recurring = NULL;
+
+

§8. This is a property name to do with scenes which Inform provides special support for; it recognises the English name when it is defined by the Standard Rules. (So there is no need to translate this to other languages.)

@@ -245,10 +170,10 @@ Standard Rules. (So there is no need to translate this to other languages.) recurring
-

§13.

+

§9.

-int PL::Scenes::scenes_new_property_notify(property *prn) {
+int Scenes::new_property_notify(property *prn) {
     if (<notable-scene-properties>(prn->name)) {
         switch (<<r>>) {
             case 0: P_recurring = prn; break;
@@ -257,34 +182,75 @@ Standard Rules. (So there is no need to translate this to other languages.)
     return FALSE;
 }
 
-

§14. Scene structures are automatically created whenever a new instance of the -kind "scene" is created, and this is where that happens. +

§10. Conceptual model of scenes. Scenes are gated intervals of time, but there are more than two gates: for +while there is only one past, there are many possible futures. These gates +are called "ends" in the code below, and are numbered end 0 (the beginning), +end 1 (the usual end), and then any named ends ("ends badly" or "ends +triumphantly", for instance, might be ends 2 and 3). Each end has a condition +which can cause it, or can be "anchored" to any number of ends of other +scenes — to express which, the scene_connector structure is used.

+
define MAX_SCENE_ENDS 32  this must exceed 31
+
-int PL::Scenes::scenes_new_named_instance_notify(instance *I) {
-    if ((K_scene) && (Kinds::eq(Instances::to_kind(I), K_scene))) {
-        PL::Scenes::new_scene(I);
-        return TRUE;
-    }
-    return FALSE;
+typedef struct scene {
+    struct instance *as_instance;  the constant for the name of the scene
+    int once_only;  cannot repeat during play
+    int start_of_play;  if begins when play begins
+    int marker;  used to detect potentially infinite recursion when scene changes occur
+    int no_ends;  how many ends the scene has
+    struct scene_end ends[MAX_SCENE_ENDS];
+    int indexed;  temporary storage during Scenes index creation
+    CLASS_DEFINITION
+} scene;
+
+typedef struct scene_end {
+    struct wording end_names;  for ends 2, 3, ...: e.g. "badly"
+    struct rulebook *end_rulebook;  rules to apply then
+    struct parse_node *anchor_condition;
+    struct scene_connector *anchor_connectors;  linked list
+    struct parse_node *anchor_condition_set;  where set
+    CLASS_DEFINITION
+} scene_end;
+
+typedef struct scene_connector {
+    struct scene *connect_to;  scene connected to
+    int end;  end number: see above
+    struct scene_connector *next;  next in list of connectors for a scene end
+    struct parse_node *where_said;  where this linkage was specified in source
+} scene_connector;
+
+scene *SC_entire_game = NULL;
+
+wording Scenes::get_name(scene *sc) {
+    return Instances::get_name(sc->as_instance, FALSE);
 }
 
-

§15. Scene structures. As we've seen, the following is called whenever a new instance of "scene" +

  • The structure scene is private to this section.
  • The structure scene_end is private to this section.
  • The structure scene_connector is accessed in 2/ri, 3/tm, 3/ts, 4/act, 4/anl, 4/ap2, 4/nap, 5/tfg, 5/gl and here.
+

§11. A plugin called xyzzy generally has a hunk of subject data called xyzzy_data, +so we would normally have a structure called scenes_data, but in fact that +structure is just going to be scene. So: +

+ +
define scenes_data scene
+define SCENES_DATA(subj) PLUGIN_DATA_ON_SUBJECT(scenes, subj)
+
+

§12. Scene structures. As we've seen, the following is called whenever a new instance of "scene" is created:

-void PL::Scenes::new_scene(instance *I) {
+void Scenes::new_scene(instance *I) {
     scene *sc = CREATE(scene);
-    Connect the scene structure to the instance15.3;
-    Initialise the scene structure15.1;
+    Connect the scene structure to the instance12.3;
+    Initialise the scene structure12.1;
 }
 
-

§15.1. A scene begins with two ends, 0 (beginning) and 1 (standard end). +

§12.1. A scene begins with two ends, 0 (beginning) and 1 (standard end).

-

Initialise the scene structure15.1 = +

Initialise the scene structure12.1 =

@@ -292,16 +258,14 @@ is created:
     sc->indexed = FALSE;
     sc->no_ends = 2;
     sc->start_of_play = FALSE;
-    sc->scene_declared_at = current_sentence;
-    int end;
-    for (end=0; end<sc->no_ends; end++) {
-        sc->anchor_condition[end] = NULL;
-        sc->anchor_scene[end] = NULL;
-        PL::Scenes::new_scene_rulebook(sc, end);
+    for (int end=0; end<sc->no_ends; end++) {
+        sc->ends[end].anchor_condition = NULL;
+        sc->ends[end].anchor_connectors = NULL;
+        Scenes::new_scene_rulebook(sc, end);
     }
 
-
  • This code is used in §15.
-

§15.2. This is a scene name which Inform provides special support for; it recognises +

  • This code is used in §12.
+

§12.2. This is a scene name which Inform provides special support for; it recognises the English name when it is defined by the Standard Rules. (So there is no need to translate this to other languages.)

@@ -311,7 +275,7 @@ to translate this to other languages.) entire game
-

§15.3. Connect the scene structure to the instance15.3 = +

§12.3. Connect the scene structure to the instance12.3 =

@@ -320,45 +284,40 @@ to translate this to other languages.)
     wording W = Instances::get_name(I, FALSE);
     if (<notable-scenes>(W)) SC_entire_game = sc;
 
-
  • This code is used in §15.
-

§16. So we sometimes want to be able to get from an instance to its scene structure. +

  • This code is used in §12.
+

§13. So we sometimes want to be able to get from an instance to its scene structure.

-scene *PL::Scenes::from_named_constant(instance *I) {
+scene *Scenes::from_named_constant(instance *I) {
     if (K_scene == NULL) return NULL;
     kind *K = Instances::to_kind(I);
     if (Kinds::eq(K, K_scene)) return PLUGIN_DATA_ON_SUBJECT(scenes, I->as_subject);
     return NULL;
 }
-
-wording PL::Scenes::get_name(scene *sc) {
-    return Instances::get_name(sc->as_instance, FALSE);
-}
 
-

§17. Creating and parsing ends.

+

§14. Creating and parsing ends.

-int PL::Scenes::parse_scene_end_name(scene *sc, wording EW, int create) {
-    int i;
-    for (i=2; i<sc->no_ends; i++)
-        if (Wordings::match(EW, sc->end_names[i]))
+int Scenes::parse_scene_end_name(scene *sc, wording EW, int create) {
+    for (int i=2; i<sc->no_ends; i++)
+        if (Wordings::match(EW, sc->ends[i].end_names))
             return i;
     if (create) {
         int end = sc->no_ends++;
         int max = 31;
         if (TargetVMs::is_16_bit(Task::vm())) max = 15;
-        if (end >= max) Issue a too-many-ends problem message17.1
+        if (end >= max) Issue a too-many-ends problem message14.1
         else {
-            sc->end_names[end] = EW;
-            PL::Scenes::new_scene_rulebook(sc, end);
+            sc->ends[end].end_names = EW;
+            Scenes::new_scene_rulebook(sc, end);
             return end;
         }
     }
     return -1;
 }
 
-

§17.1. Issue a too-many-ends problem message17.1 = +

§14.1. Issue a too-many-ends problem message14.1 =

@@ -370,28 +329,28 @@ to translate this to other languages.)
         "count as two of those, so you can only name up to 13 or 29 more specific "
         "ways for the scene to end.)");
 
-
  • This code is used in §17.
-

§18. Scene end rulebooks.

+
  • This code is used in §14.
+

§15. Scene end rulebooks.

-void PL::Scenes::new_scene_rulebook(scene *sc, int end) {
+void Scenes::new_scene_rulebook(scene *sc, int end) {
     wording RW = EMPTY_WORDING, AW = EMPTY_WORDING;
-    Compose a name and alternate name for the new scene end rulebook18.1;
+    Compose a name and alternate name for the new scene end rulebook15.1;
 
     rulebook *rb = Rulebooks::new_automatic(RW, K_action_name,
             NO_OUTCOME, FALSE, FALSE, FALSE, Hierarchy::local_package(RULEBOOKS_HAP));
     Rulebooks::set_alt_name(rb, AW);
-    sc->end_rulebook[end] = rb;
+    sc->ends[end].end_rulebook = rb;
 
-    if (end >= 2) Define phrases detecting whether or not the scene has ended this way18.2;
+    if (end >= 2) Define phrases detecting whether or not the scene has ended this way15.2;
 }
 
-

§18.1. For example, if a scene is called "Banquet Entertainment" and it ends +

§15.1. For example, if a scene is called "Banquet Entertainment" and it ends "merrily", then the rulebook has two names: "when Banquet Entertainment ends merrily" and "when the Banquet Entertainment ends merrily".

-

Compose a name and alternate name for the new scene end rulebook18.1 = +

Compose a name and alternate name for the new scene end rulebook15.1 =

@@ -401,7 +360,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily".
     Feeds::feed_C_string_expanding_strings(L"when");
     Feeds::feed_wording(NW);
     Feeds::feed_C_string_expanding_strings((end==0)?L"begins":L"ends");
-    if (end >= 2) Feeds::feed_wording(sc->end_names[end]);
+    if (end >= 2) Feeds::feed_wording(sc->ends[end].end_names);
     RW = Feeds::end(id);
 
     id = Feeds::begin();
@@ -409,11 +368,11 @@ ends merrily" and "when the Banquet Entertainment ends merrily".
     NW = Instances::get_name(sc->as_instance, FALSE);
     Feeds::feed_wording(NW);
     Feeds::feed_C_string_expanding_strings((end==0)?L"begins":L"ends");
-    if (end >= 2) Feeds::feed_wording(sc->end_names[end]);
+    if (end >= 2) Feeds::feed_wording(sc->ends[end].end_names);
     AW = Feeds::end(id);
 
-
  • This code is used in §18.
-

§18.2. Define phrases detecting whether or not the scene has ended this way18.2 = +

  • This code is used in §15.
+

§15.2. Define phrases detecting whether or not the scene has ended this way15.2 =

@@ -424,7 +383,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily".
     Feeds::feed_C_string_expanding_strings(L"To decide if (S - ");
     Feeds::feed_wording(NW);
     Feeds::feed_C_string_expanding_strings(L") ended ");
-    Feeds::feed_wording(sc->end_names[end]);
+    Feeds::feed_wording(sc->ends[end].end_names);
     Sentences::make_node(Task::syntax_tree(), Feeds::end(id), ':');
 
     id = Feeds::begin();
@@ -438,7 +397,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily".
     Feeds::feed_C_string_expanding_strings(L"To decide if (S - ");
     Feeds::feed_wording(NW);
     Feeds::feed_C_string_expanding_strings(L") did not end ");
-    Feeds::feed_wording(sc->end_names[end]);
+    Feeds::feed_wording(sc->ends[end].end_names);
     Sentences::make_node(Task::syntax_tree(), Feeds::end(id), ':');
 
     id = Feeds::begin();
@@ -450,14 +409,23 @@ ends merrily" and "when the Banquet Entertainment ends merrily".
     RuleSubtrees::register_recently_lexed_phrases();
     DISCARD_TEXT(i6_code)
 
-
  • This code is used in §18.
-

§19. Anchors. These are joins between the endings of different scenes, and there are two -assertion sentences to create them. This handles the special meaning "X -begins when...". +

  • This code is used in §15.
+

§16. Anchors. These are joins between the endings of different scenes, and there are two +assertion sentences to create them:

-int PL::Scenes::begins_when_SMF(int task, parse_node *V, wording *NPs) {
+int Scenes::make_special_meanings(void) {
+    SpecialMeanings::declare(Scenes::begins_when_SMF, I"scene-begins-when", 1);
+    SpecialMeanings::declare(Scenes::ends_when_SMF, I"scene-ends-when", 1);
+    return FALSE;
+}
+
+

§17. This one handles the special meaning "X begins when...". +

+ +
+int Scenes::begins_when_SMF(int task, parse_node *V, wording *NPs) {
     wording SW = (NPs)?(NPs[0]):EMPTY_WORDING;
     wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
     switch (task) {  "The Ballroom Scene begins when..."
@@ -469,21 +437,21 @@ begins when...".
             V->next->next = O;
             return TRUE;
         case PASS_1_SMFT:
-            PL::Scenes::new_scene_anchor(V, 1, 0);
+            Scenes::new_scene_anchor(V, 1, 0);
             break;
         case PASS_2_SMFT:
-            PL::Scenes::new_scene_anchor(V, 2, 0);
+            Scenes::new_scene_anchor(V, 2, 0);
             break;
     }
     return FALSE;
 }
 
-

§20. This handles the special meaning "X ends when...", which sometimes takes +

§18. This handles the special meaning "X ends when...", which sometimes takes two noun phrases and sometimes three.

-int PL::Scenes::ends_when_SMF(int task, parse_node *V, wording *NPs) {
+int Scenes::ends_when_SMF(int task, parse_node *V, wording *NPs) {
     wording SW = (NPs)?(NPs[0]):EMPTY_WORDING;
     wording OW = (NPs)?(NPs[1]):EMPTY_WORDING;
     wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING;
@@ -502,21 +470,23 @@ two noun phrases and sometimes three.
             }
             return TRUE;
         case PASS_1_SMFT:
-            PL::Scenes::new_scene_anchor(V, 1, 1);
+            Scenes::new_scene_anchor(V, 1, 1);
             break;
         case PASS_2_SMFT:
-            PL::Scenes::new_scene_anchor(V, 2, 1);
+            Scenes::new_scene_anchor(V, 2, 1);
             break;
     }
     return FALSE;
 }
 
-

§21.

+

§19. This rather clumsy global variable is a convenience when parsing the +Preform grammar below. +

 scene *scene_end_of_which_parsed = NULL;
 
-

§22. Sentences giving scene boundaries have a simple form: +

§20. Sentences giving scene boundaries have a simple form:

@@ -540,10 +510,10 @@ have to be worded as one.
 <scene-ends-sentence-subject> ::=
     <scene-name> |  ==> { TRUE, RP[1] }
-    ...             ==> Issue PM_ScenesOnly problem22.1
+    ...             ==> Issue PM_ScenesOnly problem20.1
 
-

§22.1. Issue PM_ScenesOnly problem22.1 = +

§20.1. Issue PM_ScenesOnly problem20.1 =

@@ -553,8 +523,8 @@ have to be worded as one.
         "confrontation is a scene.'");
     ==> { FALSE, NULL };
 
-
  • This code is used in §22.
-

§23. The adverb, if present, always matches, since the scene end is created +

  • This code is used in §20.
+

§21. The adverb, if present, always matches, since the scene end is created if it doesn't already exist:

@@ -563,24 +533,24 @@ if it doesn't already exist: <scene-end-name-creating> ==> { pass 1 }
-

§24. The following is elementary enough, but we want to be careful because +

§22. The following is elementary enough, but we want to be careful because there are possible ambiguities: the condition might contain the word "ends" in a different context, for instance, and could still be valid in that case.

 <scene-ends-sentence-object> ::=
-    <text-including-a-calling> |          ==> Issue PM_ScenesDisallowCalled problem24.1
+    <text-including-a-calling> |          ==> Issue PM_ScenesDisallowCalled problem22.1
     play begins |                         ==> { -1, - }
-    play ends |                           ==> Issue PM_ScenesNotPlay problem24.2
+    play ends |                           ==> Issue PM_ScenesNotPlay problem22.2
     <scene-name> begins |                 ==> { 0, -, <<scene:named>> = RP[1] }
     <scene-name> ends |                   ==> { 1, -, <<scene:named>> = RP[1] }
     <scene-name> ends <scene-end-name> |  ==> { R[2], -, <<scene:named>> = RP[1] }
-    <scene-name> ends ... |               ==> Issue PM_ScenesUnknownEnd problem24.3
+    <scene-name> ends ... |               ==> Issue PM_ScenesUnknownEnd problem22.3
     <s-condition>                         ==> { -2, -, <<parse_node:cond>> = RP[1] }
 
-

§24.1. Issue PM_ScenesDisallowCalled problem24.1 = +

§22.1. Issue PM_ScenesDisallowCalled problem22.1 =

@@ -592,8 +562,8 @@ in a different context, for instance, and could still be valid in that case.
         "not allowed!");
     ==> { -1, - };
 
-
  • This code is used in §24.
-

§24.2. Issue PM_ScenesNotPlay problem24.2 = +

  • This code is used in §22.
+

§22.2. Issue PM_ScenesNotPlay problem22.2 =

@@ -604,8 +574,8 @@ in a different context, for instance, and could still be valid in that case.
         "all scenes end.");
     ==> { -1, - };
 
-
  • This code is used in §24.
-

§24.3. Issue PM_ScenesUnknownEnd problem24.3 = +

  • This code is used in §22.
+

§22.3. Issue PM_ScenesUnknownEnd problem22.3 =

@@ -615,8 +585,8 @@ in a different context, for instance, and could still be valid in that case.
         "when...' or 'Confrontation ends tragically when...'.");
     ==> { -1, - };
 
-
  • This code is used in §24.
-

§25. Where the following filters instance names to allow those of scenes only, +

  • This code is used in §22.
+

§23. Where the following filters instance names to allow those of scenes only, and also internally converts the result:

@@ -626,40 +596,40 @@ and also internally converts the result: <scene-name-unarticled> ==> { pass 1 } <scene-name-unarticled> ::= - <instance-of-non-object> ==> Convert instance result to scene result, if possible25.1 + <instance-of-non-object> ==> Convert instance result to scene result, if possible23.1
-

§25.1. Convert instance result to scene result, if possible25.1 = +

§23.1. Convert instance result to scene result, if possible23.1 =

     instance *I = <<rp>>;
     if (Instances::of_kind(I, K_scene) == FALSE) return FALSE;
-    scene_end_of_which_parsed = PL::Scenes::from_named_constant(I);
+    scene_end_of_which_parsed = Scenes::from_named_constant(I);
     ==> { -, scene_end_of_which_parsed };
 
-
  • This code is used in §25.
-

§26. Lastly, scene end names are parsed by these internals. They are identical +

  • This code is used in §23.
+

§24. Lastly, scene end names are parsed by these internals. They are identical except that the creating case will create a new end if need be so that it never fails.

 <scene-end-name> internal {
-    int end = PL::Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, FALSE);
+    int end = Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, FALSE);
     if (end < 0) { ==> { fail nonterminal }; }
     ==> { end, - };
     return TRUE;
 }
 
 <scene-end-name-creating> internal {
-    int end = PL::Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, TRUE);
+    int end = Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, TRUE);
     ==> { end, - };
     return TRUE;
 }
 
-

§27. In a sentence like +

§25. In a sentence like

@@ -671,7 +641,7 @@ ends" the other end.

-void PL::Scenes::new_scene_anchor(parse_node *p, int phase, int given_end) {
+void Scenes::new_scene_anchor(parse_node *p, int phase, int given_end) {
     scene *this_scene = NULL;  scene whose end is being caused: must be set
     int end = -1;  end which is being anchored: must be set
 
@@ -690,50 +660,52 @@ ends" the other end.
         CW = Node::get_text(p->next->next);
     }
 
-    Parse the scene and end to be anchored27.4;
+    Parse the scene and end to be anchored25.4;
     if ((this_scene == NULL) || (end < 0)) internal_error("scene misparsed");
 
     if (phase == 2) {
-        Parse which form of anchor we have27.5;
+        Parse which form of anchor we have25.5;
         if ((this_scene == SC_entire_game) && (external_condition == NULL)) {
-            StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_EntireGameHardwired),
+            StandardProblems::sentence_problem(Task::syntax_tree(),
+                _p_(PM_EntireGameHardwired),
                 "the special 'Entire Game' scene cannot have its start or end modified",
                 "because it is a built-in scene designed to be going on whenever there "
                 "is play going on in the story.");
         } else if (when_play_begins)
-            Connect this end to the start of play27.1
+            Connect this end to the start of play25.1
         else if (other_scene)
-            Connect this end to an end of another scene27.3
+            Connect this end to an end of another scene25.3
         else if (external_condition)
-            Make this an external scene end condition27.2
+            Make this an external scene end condition25.2
         else internal_error("failed to obtain an anchor condition");
     }
 }
 
-

§27.1. Connect this end to the start of play27.1 = +

§25.1. Connect this end to the start of play25.1 =

     this_scene->start_of_play = TRUE;
 
-
  • This code is used in §27.
-

§27.2. Make this an external scene end condition27.2 = +

  • This code is used in §25.
+

§25.2. Make this an external scene end condition25.2 =

-    if (this_scene->anchor_condition[end])
-        StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ScenesOversetEnd),
+    if (this_scene->ends[end].anchor_condition)
+        StandardProblems::sentence_problem(Task::syntax_tree(),
+            _p_(PM_ScenesOversetEnd),
             "you have already told me a condition for when that happens",
             "and although a scene can be linked to the beginning or ending "
             "of any number of other scenes, it can only have a single "
             "condition such as 'when the player is in the Dining Car' "
             "to trigger it from outside the scene machinery.");
 
-    this_scene->anchor_condition[end] = external_condition;
-    this_scene->anchor_condition_set[end] = current_sentence;
+    this_scene->ends[end].anchor_condition = external_condition;
+    this_scene->ends[end].anchor_condition_set = current_sentence;
 
-
  • This code is used in §27.
-

§27.3. Connect this end to an end of another scene27.3 = +

  • This code is used in §25.
+

§25.3. Connect this end to an end of another scene25.3 =

@@ -741,11 +713,11 @@ ends" the other end.
     scon->connect_to = other_scene;
     scon->end = other_end;
     scon->where_said = current_sentence;
-    scon->next = this_scene->anchor_scene[end];
-    this_scene->anchor_scene[end] = scon;
+    scon->next = this_scene->ends[end].anchor_connectors;
+    this_scene->ends[end].anchor_connectors = scon;
 
-
  • This code is used in §27.
-

§27.4. Parse the scene and end to be anchored27.4 = +

  • This code is used in §25.
+

§25.4. Parse the scene and end to be anchored25.4 =

@@ -760,8 +732,8 @@ ends" the other end.
     } else end = given_end;
     if (end < 0) return;  to recover from any parsing Problems
 
-
  • This code is used in §27.
-

§27.5. Parse which form of anchor we have27.5 = +

  • This code is used in §25.
+

§25.5. Parse which form of anchor we have25.5 =

@@ -774,641 +746,20 @@ ends" the other end.
         }
     } else external_condition = Specifications::new_UNKNOWN(CW);
 
-
  • This code is used in §27.
-

§28. Scene-changing machinery at run-time. So what are scenes for? Well, they have two uses. One is that the end rulebooks -are run when ends occur, which is a convenient way to time events. The -following generates the necessary code to (a) detect when a scene end occurs, -and (b) act upon it. This is all handled by the following I6 routine. -

- -

There is one argument, chs: the number of iterations so far. Iterations occur -because each set of scene changes could change the circumstances in such a -way that other scene changes are now required (through external conditions, -not through anchors); we don't want this to lock up, so we will cap recursion. -Within the routine, a second local variable, ch, is a flag indicating -whether any change in status has or has not occurred. -

- -

There is no significance to the return value. -

- -
define MAX_SCENE_CHANGE_ITERATION 20
-
-
-void PL::Scenes::DetectSceneChange_routine(void) {
-    inter_name *iname = Hierarchy::find(DETECTSCENECHANGE_HL);
-    packaging_state save = Routines::begin(iname);
-    inter_symbol *chs_s = LocalVariables::add_internal_local_c_as_symbol(I"chs", "count of changes made");
-    inter_symbol *ch_s = LocalVariables::add_internal_local_c_as_symbol(I"ch", "flag: change made");
-    inter_symbol *CScene_l = Produce::reserve_label(Emit::tree(), I".CScene");
-
-    scene *sc;
-    LOOP_OVER(sc, scene) Compile code detecting the ends of a specific scene28.2;
-
-    Produce::place_label(Emit::tree(), CScene_l);
-    Add the scene-change tail28.1;
-
-    Routines::end(save);
-    Hierarchy::make_available(Emit::tree(), iname);
-}
-
-

§28.1. Add the scene-change tail28.1 = -

- -
-    Produce::inv_primitive(Emit::tree(), IF_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), GT_BIP);
-        Produce::down(Emit::tree());
-            Produce::val_symbol(Emit::tree(), K_value, chs_s);
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) MAX_SCENE_CHANGE_ITERATION);
-        Produce::up(Emit::tree());
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), PRINT_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_text(Emit::tree(), I">--> The scene change machinery is stuck.\n");
-            Produce::up(Emit::tree());
-            Produce::rtrue(Emit::tree());
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-    Produce::inv_primitive(Emit::tree(), IF_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), GT_BIP);
-        Produce::down(Emit::tree());
-            Produce::val_symbol(Emit::tree(), K_value, ch_s);
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0);
-        Produce::up(Emit::tree());
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            Produce::inv_call_iname(Emit::tree(), iname);
-            Produce::down(Emit::tree());
-                Produce::inv_primitive(Emit::tree(), PREINCREMENT_BIP);
-                Produce::down(Emit::tree());
-                    Produce::ref_symbol(Emit::tree(), K_value, chs_s);
-                Produce::up(Emit::tree());
-            Produce::up(Emit::tree());
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-    Produce::rfalse(Emit::tree());
-
-
  • This code is used in §28.
-

§28.2. Recall that ends numbered 1, 2, 3, ... are all ways for the scene to end, -so they are only checked if its status is currently running; end 0 is the -beginning, checked only if it isn't. We give priority to the higher end -numbers so that more abstruse ways to end take precedence over less. -

- -

Compile code detecting the ends of a specific scene28.2 = -

- -
-    Produce::inv_primitive(Emit::tree(), IF_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), EQ_BIP);
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL));
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-            Produce::up(Emit::tree());
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1);
-        Produce::up(Emit::tree());
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            for (int end=sc->no_ends-1; end>=1; end--)
-                PL::Scenes::test_scene_end(sc, end, ch_s, CScene_l);
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-    Produce::inv_primitive(Emit::tree(), IF_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), EQ_BIP);
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL));
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-            Produce::up(Emit::tree());
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0);
-        Produce::up(Emit::tree());
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            PL::Scenes::test_scene_end(sc, 0, ch_s, CScene_l);
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-
  • This code is used in §28.
-

§29. Individual ends are tested here. There are actually three ways an end can -occur: at start of play (for end 0 only), when an I7 condition holds, or when -another end to which it is anchored also ends. But we only check the first -two, because the third way will be taken care of by the consequences code -below. -

- -
-void PL::Scenes::test_scene_end(scene *sc, int end, inter_symbol *ch_s, inter_symbol *CScene_l) {
-    if ((end == 0) && (sc->start_of_play)) {
-        Produce::inv_primitive(Emit::tree(), IF_BIP);
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), EQ_BIP);
-            Produce::down(Emit::tree());
-                Produce::inv_primitive(Emit::tree(), BITWISEAND_BIP);
-                Produce::down(Emit::tree());
-                    Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-                    Produce::down(Emit::tree());
-                        Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_ENDINGS_HL));
-                        Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-                    Produce::up(Emit::tree());
-                    Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1);
-                Produce::up(Emit::tree());
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0);
-            Produce::up(Emit::tree());
-            Produce::code(Emit::tree());
-            Produce::down(Emit::tree());
-                PL::Scenes::compile_scene_end(sc, 0);
-            Produce::up(Emit::tree());
-        Produce::up(Emit::tree());
-    }
-    parse_node *S = sc->anchor_condition[end];
-    if (S) {
-        Reparse the scene end condition in this new context29.1;
-        Compile code to test the scene end condition29.2;
-    }
-}
-
-

§29.1. Reparse the scene end condition in this new context29.1 = -

- -
-    current_sentence = sc->anchor_condition_set[end];
-    if (Node::is(S, UNKNOWN_NT)) {
-        if (<s-condition>(Node::get_text(S))) S = <<rp>>;
-        sc->anchor_condition[end] = S;
-    }
-    if (Node::is(S, UNKNOWN_NT)) {
-        LOG("Condition: $P\n", S);
-        StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ScenesBadCondition),
-            "'begins when' and 'ends when' must be followed by a condition",
-            "which this does not seem to be, or else 'when play begins', "
-            "'when play ends', 'when S begins', or 'when S ends', where "
-            "S is the name of any scene.");
-        return;
-    }
-
-    if (Dash::check_condition(S) == FALSE) return;
-
-
  • This code is used in §29.
-

§29.2. If the condition holds, we set the change flag ch and abort the search -through scenes by jumping past the run of tests. (We can't compile a break -instruction because we're not compiling a loop.) -

- -

Compile code to test the scene end condition29.2 = -

- -
-    Produce::inv_primitive(Emit::tree(), IF_BIP);
-    Produce::down(Emit::tree());
-        current_sentence = sc->anchor_condition_set[end];
-        Specifications::Compiler::emit_as_val(K_truth_state, S);
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), STORE_BIP);
-            Produce::down(Emit::tree());
-                Produce::ref_symbol(Emit::tree(), K_value, ch_s);
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1);
-            Produce::up(Emit::tree());
-            PL::Scenes::compile_scene_end(sc, end);
-            Produce::inv_primitive(Emit::tree(), JUMP_BIP);
-            Produce::down(Emit::tree());
-                Produce::lab(Emit::tree(), CScene_l);
-            Produce::up(Emit::tree());
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-
  • This code is used in §29.
-

§30. That's everything except for the consequences of a scene end occurring. -Code for that is generated here. -

- -

Because one end can cause another, given anchoring, we must guard against -compiler hangs when the source text calls for infinite recursion (since -this would cause us to generate infinitely long code). So the marker flags -are used to mark which scenes have already been ended in code generated -for this purpose. -

- -
-void PL::Scenes::compile_scene_end(scene *sc, int end) {
-    scene *sc2;
-    LOOP_OVER(sc2, scene) sc2->marker = 0;
-    PL::Scenes::compile_scene_end_dash(sc, end);
-}
-
-

§31. The semantics of scene ending are trickier than they look, because of the -fact that "Ballroom Dance ends merrily" (say, end number 3) is in some -sense a specialisation of "Ballroom Dance ends" (1). The doctrine is that -end 3 causes end 1 to happen first, because a special ending is also a -general ending; but rules taking effect on end 3 come earlier than -those for end 1, because they're more specialised, so they have a right to -take effect first. -

- -
-void PL::Scenes::compile_scene_end_dash(scene *sc, int end) {
-    int ix = sc->allocation_id;
-    sc->marker++;
-    if (end >= 2) {
-        int e = end; end = 1;
-        Compile code to print text in response to the SCENES command31.4;
-        Compile code to update the scene status31.1;
-        Compile code to update the arrays recording most recent scene ending31.3;
-        end = e;
-    }
-    Compile code to print text in response to the SCENES command31.4;
-    Compile code to update the scene status31.1;
-    Compile code to run the scene end rulebooks31.2
-    Compile code to update the arrays recording most recent scene ending31.3;
-    Compile code to cause consequent scene ends31.5;
-
-    if (end >= 2) {
-        int e = end; end = 1;
-        Compile code to run the scene end rulebooks31.2;
-        Compile code to cause consequent scene ends31.5;
-        end = e;
-    }
-}
-
-

§31.1. If the scene has the "recurring" either/or property, then any of the -"ends" endings will fail to reset its status. (This doesn't mean that no -end actually occurred.) -

- -

Compile code to update the scene status31.1 = -

- -
-    if (end == 0) {
-        Produce::inv_primitive(Emit::tree(), STORE_BIP);
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL));
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-            Produce::up(Emit::tree());
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1);
-        Produce::up(Emit::tree());
-    } else {
-        Produce::inv_primitive(Emit::tree(), IFELSE_BIP);
-        Produce::down(Emit::tree());
-            inter_name *iname = Hierarchy::find(GPROPERTY_HL);
-            Produce::inv_call_iname(Emit::tree(), iname);
-            Produce::down(Emit::tree());
-                RTKinds::emit_weak_id_as_val(K_scene);
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) ix+1);
-                Produce::val_iname(Emit::tree(), K_value, RTProperties::iname(P_recurring));
-            Produce::up(Emit::tree());
-            Produce::code(Emit::tree());
-            Produce::down(Emit::tree());
-                Produce::inv_primitive(Emit::tree(), STORE_BIP);
-                Produce::down(Emit::tree());
-                    Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP);
-                    Produce::down(Emit::tree());
-                        Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL));
-                        Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-                    Produce::up(Emit::tree());
-                    Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0);
-                Produce::up(Emit::tree());
-            Produce::up(Emit::tree());
-            Produce::code(Emit::tree());
-            Produce::down(Emit::tree());
-                Produce::inv_primitive(Emit::tree(), STORE_BIP);
-                Produce::down(Emit::tree());
-                    Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP);
-                    Produce::down(Emit::tree());
-                        Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL));
-                        Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-                    Produce::up(Emit::tree());
-                    Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 2);
-                Produce::up(Emit::tree());
-            Produce::up(Emit::tree());
-        Produce::up(Emit::tree());
-    }
-
-
  • This code is used in §31 (twice).
-

§31.2. Compile code to run the scene end rulebooks31.2 = -

- -
-    if (end == 0) {
-        Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL));
-        Produce::down(Emit::tree());
-            Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(WHEN_SCENE_BEGINS_HL));
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->allocation_id + 1));
-        Produce::up(Emit::tree());
-    }
-    Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL));
-    Produce::down(Emit::tree());
-        Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->end_rulebook[end]->allocation_id));
-    Produce::up(Emit::tree());
-    if (end == 1) {
-        Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL));
-        Produce::down(Emit::tree());
-            Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(WHEN_SCENE_ENDS_HL));
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->allocation_id + 1));
-        Produce::up(Emit::tree());
-    }
-
-
  • This code is used in §31 (twice).
-

§31.3. Compile code to update the arrays recording most recent scene ending31.3 = -

- -
-    inter_name *sarr = Hierarchy::find(SCENE_ENDED_HL);
-    if (end == 0) sarr = Hierarchy::find(SCENE_STARTED_HL);
-    Produce::inv_primitive(Emit::tree(), STORE_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP);
-        Produce::down(Emit::tree());
-            Produce::val_iname(Emit::tree(), K_value, sarr);
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-        Produce::up(Emit::tree());
-        Produce::val_iname(Emit::tree(), K_number, Hierarchy::find(THE_TIME_HL));
-    Produce::up(Emit::tree());
-
-    Produce::inv_primitive(Emit::tree(), STORE_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP);
-        Produce::down(Emit::tree());
-            Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_ENDINGS_HL));
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-        Produce::up(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), BITWISEOR_BIP);
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_ENDINGS_HL));
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-            Produce::up(Emit::tree());
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (1 << end));
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-    Produce::inv_primitive(Emit::tree(), STORE_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP);
-        Produce::down(Emit::tree());
-            Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_LATEST_ENDING_HL));
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-        Produce::up(Emit::tree());
-        Produce::val(Emit::tree(), K_value, LITERAL_IVAL, (inter_ti) end);
-    Produce::up(Emit::tree());
-
-
  • This code is used in §31 (twice).
-

§31.4. Compile code to print text in response to the SCENES command31.4 = -

- -
-    Produce::inv_primitive(Emit::tree(), IF_BIP);
-    Produce::down(Emit::tree());
-        Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(DEBUG_SCENES_HL));
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            TEMPORARY_TEXT(OUT)
-            WRITE("[Scene '");
-            if (sc->as_instance) WRITE("%+W", Instances::get_name(sc->as_instance, FALSE));
-            WRITE("' ");
-            if (end == 0) WRITE("begins"); else WRITE("ends");
-            if (end >= 2) WRITE(" %+W", sc->end_names[end]);
-            WRITE("]\n");
-            Produce::inv_primitive(Emit::tree(), PRINT_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_text(Emit::tree(), OUT);
-            Produce::up(Emit::tree());
-            DISCARD_TEXT(OUT)
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-
  • This code is used in §31 (twice).
-

§31.5. In general, the marker count is used to ensure that PL::Scenes::compile_scene_end_dash -never calls itself for a scene it has been called with before on this round. -This prevents Inform locking up generating infinite amounts of code. However, -one exception is allowed, in very limited circumstances. Suppose we want to -make a scene recur, but only if it ends in a particular way. Then we might -type: -

- -
-

Brisk Quadrille begins when Brisk Quadrille ends untidily.

-
- -

This is allowed; it's a case where the "tolerance" below is raised. -

- -

Compile code to cause consequent scene ends31.5 = -

- -
-    scene *other_scene;
-    LOOP_OVER(other_scene, scene) {
-        int tolerance = 1;
-        if (sc == other_scene) tolerance = sc->no_ends;
-        if (other_scene->marker < tolerance) {
-            int other_end;
-            for (other_end = 0; other_end < other_scene->no_ends; other_end++) {
-                scene_connector *scon;
-                for (scon = other_scene->anchor_scene[other_end]; scon; scon = scon->next) {
-                    if ((scon->connect_to == sc) && (scon->end == end)) {
-                        Produce::inv_primitive(Emit::tree(), IF_BIP);
-                        Produce::down(Emit::tree());
-                            Produce::inv_primitive(Emit::tree(), EQ_BIP);
-                            Produce::down(Emit::tree());
-                                Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-                                Produce::down(Emit::tree());
-                                    Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL));
-                                    Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) other_scene->allocation_id);
-                                Produce::up(Emit::tree());
-                                if (other_end >= 1)
-                                    Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1);
-                                else
-                                    Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0);
-                            Produce::up(Emit::tree());
-                            Produce::code(Emit::tree());
-                            Produce::down(Emit::tree());
-                                PL::Scenes::compile_scene_end_dash(other_scene, other_end);
-                            Produce::up(Emit::tree());
-                        Produce::up(Emit::tree());
-                    }
-                }
-            }
-        }
-    }
-
-
  • This code is used in §31 (twice).
-

§32. More SCENES output. As we've seen, when the SCENES command has been typed, Inform prints a notice -out at run-time when any scene end occurs. It also prints a run-down of the -scene status at the moment the command is typed, and the following code is -what handles this. -

- -
-void PL::Scenes::ShowSceneStatus_routine(void) {
-    inter_name *iname = Hierarchy::find(SHOWSCENESTATUS_HL);
-    packaging_state save = Routines::begin(iname);
-    Produce::inv_primitive(Emit::tree(), IFDEBUG_BIP);
-    Produce::down(Emit::tree());
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            scene *sc;
-            LOOP_OVER(sc, scene) {
-                wording NW = Instances::get_name(sc->as_instance, FALSE);
-
-                Produce::inv_primitive(Emit::tree(), IFELSE_BIP);
-                Produce::down(Emit::tree());
-                    Produce::inv_primitive(Emit::tree(), EQ_BIP);
-                    Produce::down(Emit::tree());
-                        Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-                        Produce::down(Emit::tree());
-                            Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL));
-                            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-                        Produce::up(Emit::tree());
-                        Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1);
-                    Produce::up(Emit::tree());
-                    Produce::code(Emit::tree());
-                    Produce::down(Emit::tree());
-                        Show status of this running scene32.1;
-                    Produce::up(Emit::tree());
-                    Produce::code(Emit::tree());
-                    Produce::down(Emit::tree());
-                        Show status of this non-running scene32.2;
-                    Produce::up(Emit::tree());
-                Produce::up(Emit::tree());
-            }
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-    Routines::end(save);
-    Hierarchy::make_available(Emit::tree(), iname);
-}
-
-

§32.1. Show status of this running scene32.1 = -

- -
-    TEMPORARY_TEXT(T)
-    WRITE_TO(T, "Scene '%+W' playing (for ", NW);
-    Produce::inv_primitive(Emit::tree(), PRINT_BIP);
-    Produce::down(Emit::tree());
-        Produce::val_text(Emit::tree(), T);
-    Produce::up(Emit::tree());
-    DISCARD_TEXT(T)
-
-    Produce::inv_primitive(Emit::tree(), PRINTNUMBER_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), MINUS_BIP);
-        Produce::down(Emit::tree());
-            Produce::val_iname(Emit::tree(), K_number, Hierarchy::find(THE_TIME_HL));
-            Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STARTED_HL));
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-            Produce::up(Emit::tree());
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-    Produce::inv_primitive(Emit::tree(), PRINT_BIP);
-    Produce::down(Emit::tree());
-        Produce::val_text(Emit::tree(), I" mins now)\n");
-    Produce::up(Emit::tree());
-
-
  • This code is used in §32.
-

§32.2. Show status of this non-running scene32.2 = -

- -
-    Produce::inv_primitive(Emit::tree(), IF_BIP);
-    Produce::down(Emit::tree());
-        Produce::inv_primitive(Emit::tree(), GT_BIP);
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_LATEST_ENDING_HL));
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-            Produce::up(Emit::tree());
-            Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0);
-        Produce::up(Emit::tree());
-        Produce::code(Emit::tree());
-        Produce::down(Emit::tree());
-            Show status of this recently ended scene32.2.1;
-        Produce::up(Emit::tree());
-    Produce::up(Emit::tree());
-
-
  • This code is used in §32.
-

§32.2.1. Show status of this recently ended scene32.2.1 = -

- -
-    TEMPORARY_TEXT(T)
-    WRITE_TO(T, "Scene '%+W' ended", NW);
-    Produce::inv_primitive(Emit::tree(), PRINT_BIP);
-    Produce::down(Emit::tree());
-        Produce::val_text(Emit::tree(), T);
-    Produce::up(Emit::tree());
-    DISCARD_TEXT(T)
-
-    if (sc->no_ends > 2) {
-        Produce::inv_primitive(Emit::tree(), SWITCH_BIP);
-        Produce::down(Emit::tree());
-            Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-            Produce::down(Emit::tree());
-                Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_LATEST_ENDING_HL));
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-            Produce::up(Emit::tree());
-            Produce::code(Emit::tree());
-            Produce::down(Emit::tree());
-                for (int end=2; end<sc->no_ends; end++) {
-                    Produce::inv_primitive(Emit::tree(), CASE_BIP);
-                    Produce::down(Emit::tree());
-                        Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) end);
-                        Produce::code(Emit::tree());
-                        Produce::down(Emit::tree());
-                            TEMPORARY_TEXT(T)
-                            WRITE_TO(T, " %+W", sc->end_names[end]);
-                            Produce::inv_primitive(Emit::tree(), PRINT_BIP);
-                            Produce::down(Emit::tree());
-                                Produce::val_text(Emit::tree(), T);
-                            Produce::up(Emit::tree());
-                            DISCARD_TEXT(T)
-                        Produce::up(Emit::tree());
-                    Produce::up(Emit::tree());
-                }
-            Produce::up(Emit::tree());
-        Produce::up(Emit::tree());
-    }
-
-    Produce::inv_primitive(Emit::tree(), PRINT_BIP);
-    Produce::down(Emit::tree());
-        Produce::val_text(Emit::tree(), I"\n");
-    Produce::up(Emit::tree());
-
- -

§33. During clauses. We've now seen one use of scenes: they kick off rulebooks when they begin or -end. The other use for them is to predicate rules on whether they are currently -playing or not, using a "during" clause. -

- -

We allow these either to name a specific scene, or to describe a collection -of them: +

  • This code is used in §25.
+

§26. One use of scenes is to kick off rulebooks when they begin or end. The other +use for them is to predicate rules on whether they are currently playing or +not, using a "during" clause, and this is used when parsing those in rule +headers. Note that a match here can name a specific scene, or describe a +collection of them:

 <s-scene-description> ::=
-    <s-value>       ==> Filter to force this to be a scene description33.1
+    <s-value>       ==> Filter to force this to be a scene description26.1
 
-

§33.1. Filter to force this to be a scene description33.1 = +

§26.1. Filter to force this to be a scene description26.1 =

@@ -1421,55 +772,9 @@ of them:
         ==> { -, spec };
     } else return FALSE;
 
-
  • This code is used in §33.
-

§34. And this is where we compile I6 code to test that a scene matching this is -actually running: -

- -
-void PL::Scenes::emit_during_clause(parse_node *spec) {
-    int stuck = TRUE;
-    if (K_scene == NULL) { Produce::val(Emit::tree(), K_truth_state, LITERAL_IVAL, 1); return; }
-    if (Rvalues::is_rvalue(spec)) {
-        Dash::check_value(spec, K_scene);
-        instance *I = Rvalues::to_instance(spec);
-        if (Instances::of_kind(I, K_scene)) {
-            scene *sc = PL::Scenes::from_named_constant(I);
-            Produce::inv_primitive(Emit::tree(), EQ_BIP);
-            Produce::down(Emit::tree());
-                Produce::inv_primitive(Emit::tree(), LOOKUP_BIP);
-                Produce::down(Emit::tree());
-                    Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL));
-                    Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id);
-                Produce::up(Emit::tree());
-                Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1);
-            Produce::up(Emit::tree());
-            stuck = FALSE;
-        }
-    } else {
-        if (Dash::check_value(spec, Kinds::unary_con(CON_description, K_scene)) == ALWAYS_MATCH) {
-            parse_node *desc = Descriptions::to_rvalue(spec);
-            if (desc) {
-                Produce::inv_call_iname(Emit::tree(), Hierarchy::find(DURINGSCENEMATCHING_HL));
-                Produce::down(Emit::tree());
-                    Specifications::Compiler::emit_as_val(K_value, desc);
-                Produce::up(Emit::tree());
-                stuck = FALSE;
-            }
-        }
-    }
-    if (stuck) {
-        Produce::val(Emit::tree(), K_truth_state, LITERAL_IVAL, 1);
-        StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ScenesBadDuring),
-            "'during' must be followed by the name of a scene or of a "
-            "description which applies to a single scene",
-            "such as 'during Station Arrival' or 'during a recurring scene'.");
-        return;
-    }
-}
-
+
  • This code is used in §26.
diff --git a/docs/if-module/3-si.html b/docs/if-module/3-si.html index 379875d3c..8cc0d1e9d 100644 --- a/docs/if-module/3-si.html +++ b/docs/if-module/3-si.html @@ -315,7 +315,7 @@ single function to return this: }
diff --git a/docs/if-module/3-sm.html b/docs/if-module/3-sm.html index d36d35529..6b9eab104 100644 --- a/docs/if-module/3-sm.html +++ b/docs/if-module/3-sm.html @@ -209,7 +209,7 @@ of vehicle, and so on, but this would cause mayhem in the model world. So:

-int Spatial::object_is_a_room(instance *I) {
+int Spatial::object_is_a_room(instance *I) {
     if ((K_room) && (I) && (Instances::of_kind(I, K_room))) return TRUE;
     return FALSE;
 }
@@ -1466,7 +1466,7 @@ empty.
 }
 
diff --git a/docs/if-module/3-sr.html b/docs/if-module/3-sr.html index f5d922d43..99d6b1673 100644 --- a/docs/if-module/3-sr.html +++ b/docs/if-module/3-sr.html @@ -123,7 +123,7 @@ MathJax = { if (n == 1) { Make built-in spatial relationships2.1; Make built-in indirect spatial relationships2.2; - PL::MapDirections::create_relations(); + MapRelations::create_relations(); Regions::create_relations(); } } @@ -388,7 +388,7 @@ special to make it work, so this doesn't seem worth the trouble.) }
diff --git a/docs/if-module/3-tm.html b/docs/if-module/3-tm.html index 282fa1988..39f02947e 100644 --- a/docs/if-module/3-tm.html +++ b/docs/if-module/3-tm.html @@ -127,12 +127,12 @@ quite specific problem messages. }

§2. This special sentence is used as a hint in making map documents; it has no -effect on the world model itself, and so is dealt with elsewhere, in EPS Map. +effect on the world model itself, and so is dealt with elsewhere, in EPS Map (in index).

 int Map::make_special_meanings(void) {
-    SpecialMeanings::declare(PL::EPSMap::index_map_with_SMF, I"index-map-with", 4);
+    SpecialMeanings::declare(PL::EPSMap::index_map_with_SMF, I"index-map-with", 4);
     return FALSE;
 }
 
@@ -163,7 +163,7 @@ using directions to imply relations, as in "East of Eden is the Land of Nod." return FALSE; } direction_relations_noticed[no_directions_noticed] = - PL::MapDirections::create_sketchy_mapping_direction(Node::get_text(pn)); + MapRelations::create_sketchy_mapping_direction(Node::get_text(pn)); directions_noticed[no_directions_noticed++] = pn; return FALSE; } @@ -174,7 +174,7 @@ makes for more legible code if we use a special inference family of our own:

-inference_family *direction_inf = NULL;  100; where do map connections from O lead?
+inference_family *direction_inf = NULL;  where do map connections from O lead?
 

§5.

@@ -338,7 +338,7 @@ Rules. (So there is no need to translate this to other languages.) InstanceSubjects::to_object_instance(infs)); } -int Map::instance_is_a_door(instance *I) { +int Map::instance_is_a_door(instance *I) { if ((PluginManager::active(map_plugin)) && (K_door) && (I) && (Instances::of_kind(I, K_door))) return TRUE; @@ -365,7 +365,7 @@ we will assign it a number:
 int registered_directions = 0;  next direction number to be free
 
-int Map::number_of_directions(void) {
+int Map::number_of_directions(void) {
     return registered_directions;
 }
 
@@ -392,7 +392,7 @@ direction, but implies both.

§17.

-int Map::set_kind_notify(instance *I, kind *k) {
+int Map::set_kind_notify(instance *I, kind *k) {
     kind *kw = Instances::to_kind(I);
     if ((!(Kinds::Behaviour::is_object_of_kind(kw, K_direction))) &&
         (Kinds::Behaviour::is_object_of_kind(k, K_direction))) {
@@ -435,7 +435,7 @@ direction, but implies both.
     registered_directions++;
     inter_name *dname = RTMap::new_direction_iname();
     MAP_DATA(I)->direction_iname = dname;
-    PL::MapDirections::make_mapped_predicate(I);
+    MapRelations::make_mapped_predicate(I);
 
  • This code is used in §17.

§18. Map data on instances. We will use quite a lot of temporary work-space to put all of this together, @@ -465,24 +465,24 @@ isn't. struct instance *spatial_relationship[12]; int exit_lengths[MAX_DIRECTIONS]; struct instance *lock_exits[MAX_DIRECTIONS]; - struct vector position; - struct vector saved_gridpos; + struct vector position; + struct vector saved_gridpos; int cooled, shifted, zone; - struct connected_submap *submap; + struct connected_submap *submap; struct instance *next_room_in_submap; wchar_t *world_index_colour; an HTML colour for the room square (rooms only) wchar_t *world_index_text_colour; an HTML colour for the room text (rooms only) - struct map_parameter_scope local_map_parameters; temporary: used in EPS mapping + struct map_parameter_scope local_map_parameters; temporary: used in EPS mapping int eps_x, eps_y; CLASS_DEFINITION } map_data;

-
  • The structure map_data is accessed in 3/mcr, 3/sm2, 3/hm, 3/em and here.
+
  • The structure map_data is accessed in 3/mcr and here.

§19.

-int Map::new_subject_notify(inference_subject *subj) {
+int Map::new_subject_notify(inference_subject *subj) {
     map_data *md = CREATE(map_data);
     md->map_connection_a = NULL; md->map_connection_b = NULL;
     md->map_direction_a = NULL; md->map_direction_b = NULL;
@@ -496,7 +496,7 @@ isn't.
         md->exits[i] = NULL;
     }
 
-    PL::SpatialMap::initialise_mapping_data(md);
+    PL::SpatialMap::initialise_mapping_data(md);
     ATTACH_PLUGIN_DATA_TO_SUBJECT(map, subj, md);
     return FALSE;
 }
@@ -530,7 +530,7 @@ Standard Rules. (So there is no need to translate this to other languages.)
 

§22.

-int Map::new_property_notify(property *prn) {
+int Map::new_property_notify(property *prn) {
     if (<notable-map-properties>(prn->name)) {
         switch (<<r>>) {
             case 0: P_opposite = prn; break;
@@ -546,7 +546,7 @@ the map plugin is inactive; so you can still have backdrops without a map.
 

-void Map::set_found_in(instance *I, parse_node *val) {
+void Map::set_found_in(instance *I, parse_node *val) {
     if (P_found_in == NULL)
         P_found_in = ValueProperties::new_nameless(I"found_in",
             K_value);
@@ -561,7 +561,7 @@ always another direction: for example, the opposite of northwest is southeast.
 

-instance *Map::get_value_of_opposite_property(instance *I) {
+instance *Map::get_value_of_opposite_property(instance *I) {
     parse_node *val = PropertyInferences::value_of(
         Instances::as_subject(I), P_opposite);
     if (val) return Rvalues::to_object_instance(val);
@@ -576,14 +576,14 @@ noted above are keys into these arrays.
 

It might look a little wasteful of I7's memory to expand the direction inferences, a nicely compact representation, into large and sparse arrays. But it's convenient, and profiling suggests that the memory overhead is not -significant. It also means that the Spatial Map mapping code, which contains -quite crunchy algorithms, has the fastest possible access to the layout. +significant. It also means that the Spatial Map (in index) mapping code, which +contains quite crunchy algorithms, has the fastest possible access to the layout.

define MAP_EXIT(X, Y) MAP_DATA(X)->exits[Y]
 
-void Map::build_exits_array(void) {
+void Map::build_exits_array(void) {
     instance *I;
     int d = 0;
     LOOP_OVER_INSTANCES(I, K_object) {
@@ -619,7 +619,7 @@ object has four pieces of data attached:
 

-void Map::get_door_data(instance *door, instance **c1, instance **c2) {
+void Map::get_door_data(instance *door, instance **c1, instance **c2) {
     if (c1) *c1 = MAP_DATA(door)->map_connection_a;
     if (c2) *c2 = MAP_DATA(door)->map_connection_b;
 }
@@ -637,7 +637,7 @@ deduction is made:
 

-int Map::inference_drawn(inference *I, inference_subject *subj) {
+int Map::inference_drawn(inference *I, inference_subject *subj) {
     property *prn = PropertyInferences::get_property(I);
     if ((prn) && (prn == P_other_side)) {
         parse_node *val = PropertyInferences::get_value(I);
@@ -659,7 +659,7 @@ deduction is made:
 

§29.

-int Map::act_on_special_NPs(parse_node *p) {
+int Map::act_on_special_NPs(parse_node *p) {
     if (<notable-map-noun-phrases>(Node::get_text(p))) {
         switch (<<r>>) {
             case 0:
@@ -683,7 +683,7 @@ deduction is made:
 

-int Map::check_going(parse_node *from, parse_node *to,
+int Map::check_going(parse_node *from, parse_node *to,
     parse_node *by, parse_node *through, parse_node *pushing) {
     if (PL::Actions::Patterns::check_going(from, "from",
         K_room, K_region) == FALSE) return FALSE;
@@ -725,7 +725,7 @@ because, of course, that does set its kind.
 

-int Map::intervene_in_assertion(parse_node *px, parse_node *py) {
+int Map::intervene_in_assertion(parse_node *px, parse_node *py) {
     if ((Node::get_type(px) == PROPER_NOUN_NT) &&
         (Node::get_type(py) == COMMON_NOUN_NT)) {
         inference_subject *left_object = Node::get_subject(px);
@@ -809,7 +809,7 @@ pairs.
 
 void Map::oneway_map_connection(instance *go_from, instance *go_to,
     instance *forwards_dir, int certainty_level) {
-    binary_predicate *bp = PL::MapDirections::get_mapping_relation(forwards_dir);
+    binary_predicate *bp = MapRelations::get_mapping_relation(forwards_dir);
     if (bp == NULL) internal_error("map connection in non-direction");
     int x = prevailing_mood;
     prevailing_mood = certainty_level;
@@ -824,7 +824,7 @@ the map as might be thought.
 

-int Map::complete_model(int stage) {
+int Map::complete_model(int stage) {
     switch (stage) {
         case 2:
             Give each room a room-index property as workspace for route finding34.1;
@@ -1191,7 +1191,7 @@ why we don't need to compile 
 
diff --git a/docs/if-module/3-tp.html b/docs/if-module/3-tp.html index b7bbb8540..4ebd8cd68 100644 --- a/docs/if-module/3-tp.html +++ b/docs/if-module/3-tp.html @@ -180,7 +180,7 @@ is created in English.) return FALSE; } -instance *Player::get_start_room(void) { +instance *Player::get_start_room(void) { return start_room; }
@@ -236,7 +236,7 @@ aliasing.

-int Player::variable_set_warning(nonlocal_variable *nlv, parse_node *val) {
+int Player::variable_set_warning(nonlocal_variable *nlv, parse_node *val) {
     if (nlv == player_VAR) {
         instance *npc = Rvalues::to_object_instance(val);
         if (npc) {
@@ -276,7 +276,7 @@ that is, when the source text explicitly sets a value for "player".
 

-int Player::detect_bodysnatching(inference_subject *body, int *snatcher,
+int Player::detect_bodysnatching(inference_subject *body, int *snatcher,
     inference_subject **counterpart) {
     if ((player_character_object == I_yourself) ||
         (player_character_object == NULL) || (I_yourself == NULL)) return FALSE;
@@ -316,7 +316,7 @@ ensure that assemblies such as "A nose is part of every person" produces
 

-int Player::irregular_genitive(inference_subject *owner, text_stream *genitive,
+int Player::irregular_genitive(inference_subject *owner, text_stream *genitive,
     int *propriety) {
     if (owner == Instances::as_subject(I_yourself)) {
         WRITE_TO(genitive, "your ");
@@ -351,7 +351,7 @@ and people still sometimes type it.
 

§9.

-int Player::refine_implicit_noun(parse_node *p) {
+int Player::refine_implicit_noun(parse_node *p) {
     if (<implicit-player-relationship>(Node::get_text(p))) {
         Refiner::give_subject_to_noun(p, Instances::as_subject(player_character_object));
         return TRUE;
@@ -374,7 +374,7 @@ we assume he is freestanding in the earliest defined room.
 

-int Player::complete_model(int stage) {
+int Player::complete_model(int stage) {
     if ((stage == WORLD_STAGE_III) && (I_yourself)) {
         property *P_ssn = ValueProperties::new_nameless(I"saved_short_name", K_text);
         ValueProperties::assert(P_ssn, Instances::as_subject(I_yourself),
@@ -458,7 +458,7 @@ will do. But otherwise:
 
  • This code is used in §10.
diff --git a/docs/if-module/3-ts.html b/docs/if-module/3-ts.html index abfd014f9..cfffce99d 100644 --- a/docs/if-module/3-ts.html +++ b/docs/if-module/3-ts.html @@ -71,27 +71,30 @@ function togglePopup(material_id) { -

A plugin to support the maximum score variable.

+

A plugin to support the score variables.

-
- -

§1. Initialisation.

+

§1. At one time, all interactive fiction had a scoring system, because that's +what computers did for our entertainment: they rewarded us with points. Having +its distant roots in that period, Inform handles a numerical score with just +a little compiler support, and this is where. +

-void PL::Score::start(void) {
-    PluginManager::plug(PRODUCTION_LINE_PLUG, PL::Score::production_line);
-    PluginManager::plug(NEW_VARIABLE_NOTIFY_PLUG, PL::Score::new_variable_notify);
+void TheScore::start(void) {
+    PluginManager::plug(PRODUCTION_LINE_PLUG, TheScore::production_line);
+    PluginManager::plug(NEW_VARIABLE_NOTIFY_PLUG, TheScore::new_variable_notify);
 }
 
-int PL::Score::production_line(int stage, int debugging, stopwatch_timer *sequence_timer) {
+int TheScore::production_line(int stage, int debugging, stopwatch_timer *sequence_timer) {
     if (stage == INTER1_CSEQ) {
-        BENCH(PL::Score::compile_max_score);
+        BENCH(TheScore::max_score_and_ranking_table);
     }
     return FALSE;
 }
 
-

§2. For many years this was a defined I6 constant, but then people sent in bug -reports asking why it wouldn't change in play. +

§2. For many years "maximum score" was compiled to a constant, but then people sent +in bug reports asking why it wouldn't change in play. "Score", of course, is +more evidently variable.

@@ -106,10 +109,14 @@ reports asking why it wouldn't change in play.
     maximum score
 
-

§4.

+

§4. These are marked "initialisable" because of the way they are implemented at +run-time, using special variables in WorldModelKit rather than being +storage allocated by I7. Variables stored that way would not ordinarily be +possible to give values to in I7 assertions; but these are. +

-int PL::Score::new_variable_notify(nonlocal_variable *var) {
+int TheScore::new_variable_notify(nonlocal_variable *var) {
     if (<notable-scoring-variables>(var->name)) {
         switch(<<r>>) {
             case 0:
@@ -125,11 +132,10 @@ reports asking why it wouldn't change in play.
     return FALSE;
 }
 
-

§5. The maximum score and rankings table. A special rule is that if a table is called "Rankings" and contains a column +

§5. A special rule is that if a table is called "Rankings" and contains a column of numbers followed by a column of text, then it is used by the run-time scoring system. In retrospect, Inform really shouldn't support this at the -compiler level (not that it does much), and in any case it's a very old-school -idea of IF. Still, it does little harm. +compiler level (not that it does much), but it does little harm.

@@ -137,53 +143,37 @@ idea of IF. Still, it does little harm.
     rankings
 
-

§6. This can only happen if we declare it somehow in I6 code, which -we do with the constant RANKING_TABLE. We also set the MAX_SCORE variable -equal to the number in the bottom row of the table, which is assumed to be the -score corresponding to successful completion and the highest rank. +

§6. Nothing will happen unless a table has both this magic name, and also the +right shape: two columns, number then text. If so, the maximum score is +initialised to the number in the final row of the table, which is assumed to +be the score corresponding to successful completion and the highest rank. +

+ +

The test case Cooking, an example from the documentation, tests this.

-void PL::Score::compile_max_score(void) {
-    int rt_made = FALSE;
-    table *t;
-    LOOP_OVER(t, table) {
+void TheScore::max_score_and_ranking_table(void) {
+    table *t, *ranking_table = NULL;
+    LOOP_OVER(t, table)
         if ((<rankings-table-name>(t->table_name_text)) &&
             (Tables::get_no_columns(t) >= 2) &&
             (Kinds::eq(Tables::kind_of_ith_column(t, 0), K_number)) &&
-            (Kinds::eq(Tables::kind_of_ith_column(t, 1), K_text))) {
-            inter_name *iname = Hierarchy::find(RANKING_TABLE_HL);
-            Emit::named_iname_constant(iname, K_value, RTTables::identifier(t));
-            parse_node *PN = Tables::cells_in_ith_column(t, 0);
-            while ((PN != NULL) && (PN->next != NULL)) PN = PN->next;
-            if ((PN != NULL) && (max_score_VAR) &&
-                (VariableSubjects::has_initial_value_set(max_score_VAR) == FALSE))
-                Assertions::PropertyKnowledge::initialise_global_variable(
-                    max_score_VAR, Node::get_evaluation(PN));
-            Hierarchy::make_available(Emit::tree(), iname);
-            global_compilation_settings.ranking_table_given = TRUE;
-            rt_made = TRUE;
-            break;
-        }
-    }
-    if (rt_made == FALSE) {
-        inter_name *iname = Hierarchy::find(RANKING_TABLE_HL);
-        Emit::named_generic_constant(iname, LITERAL_IVAL, 0);
-        Hierarchy::make_available(Emit::tree(), iname);
-    }
-    inter_name *iname = Hierarchy::find(INITIAL_MAX_SCORE_HL);
-    Hierarchy::make_available(Emit::tree(), iname);
-    if (VariableSubjects::has_initial_value_set(max_score_VAR)) {
-        inter_ti v1 = 0, v2 = 0;
-        RTVariables::seek_initial_value(iname, &v1, &v2, max_score_VAR);
-        Emit::named_generic_constant(iname, v1, v2);
-    } else {
-        Emit::named_numeric_constant(iname, 0);
+            (Kinds::eq(Tables::kind_of_ith_column(t, 1), K_text)))
+            ranking_table = t;
+    if (ranking_table) {
+        parse_node *PN = Tables::cells_in_ith_column(ranking_table, 0);
+        while ((PN != NULL) && (PN->next != NULL)) PN = PN->next;
+        if ((PN != NULL) && (max_score_VAR) &&
+            (VariableSubjects::has_initial_value_set(max_score_VAR) == FALSE))
+            Assertions::PropertyKnowledge::initialise_global_variable(
+                max_score_VAR, Node::get_evaluation(PN));
     }
+    RTTheScore::support(ranking_table);
 }
 
diff --git a/docs/if-module/4-act.html b/docs/if-module/4-act.html index 14867d1fe..5b717421d 100644 --- a/docs/if-module/4-act.html +++ b/docs/if-module/4-act.html @@ -138,7 +138,7 @@ and maximum below are always equal. CLASS_DEFINITION } action_name;
-
  • The structure action_name is accessed in 2/bd, 3/sm, 3/tp, 3/bck, 3/rgn, 3/tm, 3/em, 3/sc, 3/scn, 3/ts, 4/anaa, 4/anl, 4/nap, 4/ai, 5/pp, 5/gv, 5/gl, 5/gpr and here.
+
  • The structure action_name is accessed in 2/bd, 3/sm, 3/tp, 3/bck, 3/rgn, 3/tm, 3/scn, 3/ts, 4/anaa, 4/anl, 4/nap, 4/ai, 5/pp, 5/gv, 5/gl, 5/gpr and here.

§3.

diff --git a/docs/if-module/4-anl.html b/docs/if-module/4-anl.html
index 8be7cebb5..4e7097e8b 100644
--- a/docs/if-module/4-anl.html
+++ b/docs/if-module/4-anl.html
@@ -107,7 +107,7 @@ MathJax = {
     int delete_this_link;  used temporarily during parsing
 } action_name_list;
 
-
  • The structure action_name_list is accessed in 2/ri, 3/tm, 3/em, 3/scn, 3/tm2, 3/ts, 4/act, 4/ap2, 4/nap, 5/tfg, 5/gl and here.
+
  • The structure action_name_list is accessed in 2/ri, 3/tm, 3/scn, 3/ts, 4/act, 4/ap2, 4/nap, 5/tfg, 5/gl and here.

§2. The action name list is the part of an action pattern identifying which actions are allowed: "taking, dropping or examining" for example. The following routine extracts this from a potentially longer diff --git a/docs/if-module/4-ap2.html b/docs/if-module/4-ap2.html index ce95fcb04..bf7c64ab4 100644 --- a/docs/if-module/4-ap2.html +++ b/docs/if-module/4-ap2.html @@ -151,7 +151,7 @@ not-really-action APs are used in no other context, and employ the CLASS_DEFINITION } ap_optional_clause;

-
  • The structure action_pattern is accessed in 2/ri, 3/tm, 3/em, 3/scn, 3/tm2, 3/ts, 4/act, 4/anl, 4/nap, 5/tfg, 5/gl and here.
  • The structure ap_optional_clause is accessed in 2/ri, 3/tm, 3/em, 3/scn, 3/tm2, 3/ts, 4/act, 4/anl, 4/nap, 5/tfg, 5/gl and here.
+
  • The structure action_pattern is accessed in 2/ri, 3/tm, 3/scn, 3/ts, 4/act, 4/anl, 4/nap, 5/tfg, 5/gl and here.
  • The structure ap_optional_clause is accessed in 2/ri, 3/tm, 3/scn, 3/ts, 4/act, 4/anl, 4/nap, 5/tfg, 5/gl and here.

§2. When we parse action patterns, we record why they fail, in order to make it easier to produce helpful error messages. (We can't simply fire off errors at the time they occur, because text is often parsed in several diff --git a/docs/if-module/4-nap.html b/docs/if-module/4-nap.html index cda0f8368..9d0fea9cf 100644 --- a/docs/if-module/4-nap.html +++ b/docs/if-module/4-nap.html @@ -85,7 +85,7 @@ function togglePopup(material_id) { CLASS_DEFINITION } named_action_pattern;

-
  • The structure named_action_pattern is accessed in 2/bd, 3/sm, 3/tp, 3/bck, 3/rgn, 3/tm, 3/em, 3/sc, 3/scn, 3/ts, 4/anaa, 4/act, 4/anl, 5/pp, 5/gv, 5/gpr and here.
+
  • The structure named_action_pattern is accessed in 2/bd, 3/sm, 3/tp, 3/bck, 3/rgn, 3/tm, 3/scn, 3/ts, 4/anaa, 4/act, 4/anl, 5/pp, 5/gv, 5/gpr and here.

§2.

diff --git a/docs/if-module/5-gv.html b/docs/if-module/5-gv.html
index 90ef57454..d4a68c95a 100644
--- a/docs/if-module/5-gv.html
+++ b/docs/if-module/5-gv.html
@@ -126,7 +126,7 @@ of these is associated with a genuine typed-by-the-player command verb:
     CLASS_DEFINITION
 } grammar_verb;
 
-
  • The structure grammar_verb is accessed in 2/bd, 3/sm, 3/tp, 3/bck, 3/rgn, 3/tm, 3/em, 3/sc, 3/scn, 3/ts, 4/anaa, 4/act, 4/anl, 4/nap, 5/pp, 5/gpr and here.
+
  • The structure grammar_verb is accessed in 2/bd, 3/sm, 3/tp, 3/bck, 3/rgn, 3/tm, 3/scn, 3/ts, 4/anaa, 4/act, 4/anl, 4/nap, 5/pp, 5/gpr and here.

§3. A few imperative verbs are reserved for Inform testing, such as SHOWME. We record those as instances of the following:

diff --git a/docs/if-module/5-tfg.html b/docs/if-module/5-tfg.html index 901e98c96..511ce7aa6 100644 --- a/docs/if-module/5-tfg.html +++ b/docs/if-module/5-tfg.html @@ -108,7 +108,7 @@ function togglePopup(material_id) { struct understanding_reference *next; } understanding_reference;
-
  • The structure understanding_item is accessed in 2/ri, 3/tm, 3/em, 3/scn, 3/tm2, 3/ts, 4/act, 4/anl, 4/ap2, 4/nap, 5/gl and here.
  • The structure understanding_reference is accessed in 2/ri, 3/tm, 3/em, 3/scn, 3/tm2, 3/ts, 4/act, 4/anl, 4/ap2, 4/nap, 5/gl and here.
+
  • The structure understanding_item is accessed in 2/ri, 3/tm, 3/scn, 3/ts, 4/act, 4/anl, 4/ap2, 4/nap, 5/gl and here.
  • The structure understanding_reference is accessed in 2/ri, 3/tm, 3/scn, 3/ts, 4/act, 4/anl, 4/ap2, 4/nap, 5/gl and here.

§3. New grammar arrives in the system in two ways: primarily by means of explicit Understand sentences in the source text, but also secondarily in the form of table entries or other values used to match against snippets. For example: diff --git a/docs/if-module/index.html b/docs/if-module/index.html index f064c43ae..ffa925653 100644 --- a/docs/if-module/index.html +++ b/docs/if-module/index.html @@ -171,45 +171,15 @@ Map Connection Relations - To define one binary predicate for each map direction, such as "mapped north of".

-
  • -

    - Spatial Geometry - - To deal with vectors and cuboids in a three-dimensional integer lattice.

    -
  • -
  • -

    - Spatial Map - - To fit the map of the rooms in the game into a cubical grid, preserving distances and angles where possible, and so to give each room approximate coordinate locations.

    -
  • -
  • -

    - HTML Map - - To render the spatial map of rooms as HTML.

    -
  • -
  • -

    - EPS Map - - To render the spatial map of rooms as an EPS (Encapsulated PostScript) file.

    -
  • -
  • -

    - Showme Command - - A plugin to provide some support for the SHOWME testing command.

    -
  • Scenes - - Scenes are periods of time during play: at any given moment, several may be going on, or none. They are started and stopped when certain conditions are met, or by virtue of having been anchored together.

    -
  • -
  • -

    - Temporal Map - - Parallel to the World index of space is the Scenes index of time, and in this section we render it as HTML.

    + A plugin to support named periods of time during an interactive story.

  • The Score - - A plugin to support the maximum score variable.

    + A plugin to support the score variables.

  • diff --git a/docs/imperative-module/2-rls.html b/docs/imperative-module/2-rls.html index 54c5955f3..c74500b0d 100644 --- a/docs/imperative-module/2-rls.html +++ b/docs/imperative-module/2-rls.html @@ -907,7 +907,7 @@ as the definition of the rule in future. #ifdef IF_MODULE if (rc.scene_context) { WRITE(" during "); - wording SW = PL::Scenes::get_name(rc.scene_context); + wording SW = Scenes::get_name(rc.scene_context); WRITE("%+W", SW); } #endif diff --git a/docs/imperative-module/3-prcd.html b/docs/imperative-module/3-prcd.html index 94b8916d9..503706ece 100644 --- a/docs/imperative-module/3-prcd.html +++ b/docs/imperative-module/3-prcd.html @@ -234,7 +234,7 @@ extracts a single specified scene if there is one: if (phrcd == NULL) return NULL; if (Rvalues::is_rvalue(phrcd->during_scene)) { instance *q = Rvalues::to_instance(phrcd->during_scene); - if (q) return PL::Scenes::from_named_constant(q); + if (q) return Scenes::from_named_constant(q); } return NULL; } @@ -510,7 +510,7 @@ with the default outcome return (see above).
         Produce::inv_primitive(Emit::tree(), IFELSE_BIP);
         Produce::down(Emit::tree());
    -        PL::Scenes::emit_during_clause(phrcd->during_scene);
    +        RTScenes::emit_during_clause(phrcd->during_scene);
             Produce::code(Emit::tree());
             Produce::down(Emit::tree());
     
    diff --git a/docs/index-module/1-im.html b/docs/index-module/1-im.html
    index a2cfa1f32..e1c3f86f8 100644
    --- a/docs/index-module/1-im.html
    +++ b/docs/index-module/1-im.html
    @@ -95,7 +95,7 @@ which use this module:
     }
     
    diff --git a/docs/index-module/2-adj.html b/docs/index-module/2-adj.html index d258a0308..ff1a2bcd5 100644 --- a/docs/index-module/2-adj.html +++ b/docs/index-module/2-adj.html @@ -104,7 +104,7 @@ prefaced "(of a rulebook)", "(of an activity)", and so on.
    • This code is used in §1.
    diff --git a/docs/index-module/2-dr.html b/docs/index-module/2-dr.html index fcff6169f..1ab893dc7 100644 --- a/docs/index-module/2-dr.html +++ b/docs/index-module/2-dr.html @@ -472,7 +472,7 @@ and we need to search fairly seldom:
    • This code is used in §12.
    diff --git a/docs/index-module/2-ie.html b/docs/index-module/2-ie.html index 6ca5b3d09..d474058ad 100644 --- a/docs/index-module/2-ie.html +++ b/docs/index-module/2-ie.html @@ -246,13 +246,13 @@ documentation page could be forgiven for thinking it a miscellany. nonlocal_variable *q; int kc = 0; LOOP_OVER(q, nonlocal_variable) - if ((Wordings::first_wn(q->name) >= 0) && + if ((Wordings::first_wn(q->name) >= 0) && (NonlocalVariables::is_global(q)) && - (Lexer::file_of_origin(Wordings::first_wn(q->name)) == E->read_into_file) && - (Headings::indexed(Headings::of_wording(q->name)))) { - if (<value-understood-variable-name>(q->name) == FALSE) + (Lexer::file_of_origin(Wordings::first_wn(q->name)) == E->read_into_file) && + (Headings::indexed(Headings::of_wording(q->name)))) { + if (<value-understood-variable-name>(q->name) == FALSE) kc = IndexExtensions::document_headword(OUT, - kc, E, "Values that vary", I"value", q->name); + kc, E, "Values that vary", I"value", q->name); } if (kc != 0) HTML_CLOSE("p");
    @@ -338,11 +338,11 @@ documentation page could be forgiven for thinking it a miscellany. property *prn; int kc = 0; LOOP_OVER(prn, property) - if ((Wordings::nonempty(prn->name)) && + if ((Wordings::nonempty(prn->name)) && (IXProperties::is_shown_in_index(prn)) && - (Lexer::file_of_origin(Wordings::first_wn(prn->name)) == E->read_into_file)) + (Lexer::file_of_origin(Wordings::first_wn(prn->name)) == E->read_into_file)) kc = IndexExtensions::document_headword(OUT, kc, E, "Properties", I"property", - prn->name); + prn->name); if (kc != 0) HTML_CLOSE("p");
    • This code is used in §2.
    @@ -356,10 +356,10 @@ documentation page could be forgiven for thinking it a miscellany. use_option *uo; int kc = 0; LOOP_OVER(uo, use_option) - if ((Wordings::first_wn(uo->name) >= 0) && - (Lexer::file_of_origin(Wordings::first_wn(uo->name)) == E->read_into_file)) + if ((Wordings::first_wn(uo->name) >= 0) && + (Lexer::file_of_origin(Wordings::first_wn(uo->name)) == E->read_into_file)) kc = IndexExtensions::document_headword(OUT, kc, E, "Use options", I"use option", - uo->name); + uo->name); if (kc != 0) HTML_CLOSE("p");
    • This code is used in §2.
    @@ -379,7 +379,7 @@ dictionary. }
    diff --git a/docs/index-module/2-ifs.html b/docs/index-module/2-ifs.html index 25f0fdf4f..b569c42de 100644 --- a/docs/index-module/2-ifs.html +++ b/docs/index-module/2-ifs.html @@ -813,7 +813,7 @@ to show, hide and colour things: if (Str::eq_wide_string(elt, L"Pl")) { #ifdef IF_MODULE - PL::Scenes::Index::index(OUT); + IXScenes::index(OUT); #endif return; } @@ -823,7 +823,7 @@ to show, hide and colour things: } if (Str::eq_wide_string(elt, L"RS")) { #ifdef IF_MODULE - PL::Scenes::Index::index_rules(OUT); + IXScenes::index_rules(OUT); #endif return; } @@ -941,7 +941,7 @@ the source text in the application.

    -void Index::link(OUTPUT_STREAM, int wn) {
    +void Index::link(OUTPUT_STREAM, int wn) {
         Index::link_to_location(OUT, Lexer::word_location(wn), TRUE);
     }
     
    @@ -994,18 +994,18 @@ code.
         HTML_CLOSE("a");
     }
     
    -void Index::anchor(OUTPUT_STREAM, text_stream *p) {
    +void Index::anchor(OUTPUT_STREAM, text_stream *p) {
         HTML_OPEN_WITH("a", "name=%S", p); HTML_CLOSE("a");
     }
     
    -void Index::below_link_numbered(OUTPUT_STREAM, int n) {
    +void Index::below_link_numbered(OUTPUT_STREAM, int n) {
         WRITE("&nbsp;");
         HTML_OPEN_WITH("a", "href=#A%d", n);
         HTML_TAG_WITH("img", "border=0 src=inform:/doc_images/Below.png");
         HTML_CLOSE("a");
     }
     
    -void Index::anchor_numbered(OUTPUT_STREAM, int n) {
    +void Index::anchor_numbered(OUTPUT_STREAM, int n) {
         HTML_OPEN_WITH("a", "name=A%d", n); HTML_CLOSE("a");
     }
     
    @@ -1155,7 +1155,7 @@ quotes. }
    diff --git a/docs/index-module/2-ih.html b/docs/index-module/2-ih.html index 6d11e3503..fab87286a 100644 --- a/docs/index-module/2-ih.html +++ b/docs/index-module/2-ih.html @@ -169,7 +169,7 @@ surreptitiously check that it is correctly formed at the same time. } }
    -
    • The structure contents_entry is accessed in 2/ins and here.
    +
    • The structure contents_entry is accessed in 2/ins, 3/scn, 4/em and here.

    §3.1. Index this entry in the contents3.1 =

    @@ -350,7 +350,7 @@ but should this arise then the best recourse is to ignore the heading.
    • This code is used in §4.
    diff --git a/docs/index-module/2-inf.html b/docs/index-module/2-inf.html index 6af7ad059..ff23c002f 100644 --- a/docs/index-module/2-inf.html +++ b/docs/index-module/2-inf.html @@ -128,13 +128,13 @@ state of being boolean, and the given certainty levels: if (f) { WRITE("<i>%s</i> ", cert); f = FALSE; } else WRITE(", "); - WRITE("%+W", prn->name); + WRITE("%+W", prn->name); IXProperties::set_indexed_already_flag(prn, TRUE); if (Properties::is_either_or(prn)) { property *prnbar = EitherOrProperties::get_negation(prn); if (prnbar) { - WRITE(" <i>not</i> %+W", prnbar->name); + WRITE(" <i>not</i> %+W", prnbar->name); IXProperties::set_indexed_already_flag(prnbar, TRUE); } } else { @@ -169,7 +169,7 @@ state of being boolean, and the given certainty levels: if (k == 1) HTML::open_indented_p(OUT, 1, "hanging"); else WRITE("; "); if (S < 0) WRITE("not "); - WRITE("%+W", prn->name); + WRITE("%+W", prn->name); if (P) Index::link(OUT, Wordings::first_wn(Node::get_text(P))); } } @@ -183,7 +183,7 @@ state of being boolean, and the given certainty levels: parse_node *S = PropertyInferences::value_and_where_without_inheritance(infs, prn, &P); if ((S) && (Wordings::nonempty(Node::get_text(S)))) { HTML::open_indented_p(OUT, 1, "hanging"); - WRITE("%+W: ", prn->name); + WRITE("%+W: ", prn->name); HTML::begin_colour(OUT, I"000080"); WRITE("%+W", Node::get_text(S)); HTML::end_colour(OUT); @@ -194,7 +194,7 @@ state of being boolean, and the given certainty levels: }
    diff --git a/docs/index-module/2-ins.html b/docs/index-module/2-ins.html index 466a0d032..ec833606a 100644 --- a/docs/index-module/2-ins.html +++ b/docs/index-module/2-ins.html @@ -89,7 +89,7 @@ function togglePopup(material_id) { struct instance_usage *next; } instance_usage;
    -
    • The structure instance_index_data is private to this section.
    • The structure instance_usage is private to this section.
    +
    • The structure instance_index_data is private to this section.
    • The structure instance_usage is accessed in 3/scn, 4/em and here.

    §2.

    @@ -116,7 +116,7 @@ function togglePopup(material_id) {
     

    -void IXInstances::index_name(OUTPUT_STREAM, instance *I) {
    +void IXInstances::index_name(OUTPUT_STREAM, instance *I) {
         wording W = Instances::get_name_in_play(I, FALSE);
         if (Wordings::nonempty(W)) {
             WRITE("%+W", W);
    @@ -183,7 +183,7 @@ constant value.
             if (Properties::get_permissions(P)) {
                 WRITE("(of "); IXProperties::index_permissions(OUT, P); WRITE(") ");
             }
    -        WRITE("having this %+W", P->name);
    +        WRITE("having this %+W", P->name);
         } else {
             WRITE("a condition which is otherwise ");
             kind *K = Instances::to_kind(I);
    @@ -203,7 +203,7 @@ constant value.
     }
     
    diff --git a/docs/index-module/2-ipw.html b/docs/index-module/2-ipw.html index a97ec446a..3e8d9c5bc 100644 --- a/docs/index-module/2-ipw.html +++ b/docs/index-module/2-ipw.html @@ -118,12 +118,12 @@ instance) Spatial. if (Task::wraps_existing_storyfile()) return; in this case there is no model world if (PluginManager::active(map_plugin) == FALSE) return; in this case there is no model world - PL::SpatialMap::establish_benchmark_room(); - PL::EPSMap::traverse_for_map_parameters(1); - PL::SpatialMap::establish_spatial_coordinates(); - PL::HTMLMap::render_map_as_HTML(OUT); - PL::HTMLMap::add_region_key(OUT); - PL::EPSMap::render_map_as_EPS(); + PL::SpatialMap::establish_benchmark_room(); + PL::EPSMap::traverse_for_map_parameters(1); + PL::SpatialMap::establish_spatial_coordinates(); + PL::HTMLMap::render_map_as_HTML(OUT); + PL::HTMLMap::add_region_key(OUT); + PL::EPSMap::render_map_as_EPS(); IXBackdrops::index_object_further(OUT, NULL, 0, FALSE, 1); @@ -167,7 +167,7 @@ instance) Spatial. HTML_OPEN("p"); subheaded = TRUE; } - PL::HTMLMap::render_single_room_as_HTML(OUT, rm); + PL::HTMLMap::render_single_room_as_HTML(OUT, rm); IXInstances::increment_indexing_count(rm); } } @@ -192,7 +192,7 @@ instance) Spatial. if ((Spatial::object_is_a_room(I)) && (IXInstances::indexed_yet(I) == FALSE)) { Start a new details panel on the World index2.2.2; - PL::HTMLMap::render_single_room_as_HTML(OUT, I); + PL::HTMLMap::render_single_room_as_HTML(OUT, I); }
    • This code is used in §2.
    @@ -249,7 +249,7 @@ table of Kinds. return indexing_room; } -void Data::Objects::index(OUTPUT_STREAM, instance *I, kind *K, int depth, int details) { +void Data::Objects::index(OUTPUT_STREAM, instance *I, kind *K, int depth, int details) { if (depth == MAX_OBJECT_INDEX_DEPTH) internal_error("MAX_OBJECT_INDEX_DEPTH exceeded"); noun *nt = NULL; if (I) { @@ -509,7 +509,7 @@ table of Kinds. }
    diff --git a/docs/index-module/2-ki.html b/docs/index-module/2-ki.html index a4d942249..1000c788c 100644 --- a/docs/index-module/2-ki.html +++ b/docs/index-module/2-ki.html @@ -571,7 +571,7 @@ as "0 kg", "0 hectares", or whatever is appropriate.
    diff --git a/docs/index-module/2-li.html b/docs/index-module/2-li.html index 854d34d98..41edec251 100644 --- a/docs/index-module/2-li.html +++ b/docs/index-module/2-li.html @@ -654,7 +654,7 @@ be able to print out a table of just those verbs created in that extension. }
    diff --git a/docs/index-module/2-prp.html b/docs/index-module/2-prp.html index 60ef9ba87..607551325 100644 --- a/docs/index-module/2-prp.html +++ b/docs/index-module/2-prp.html @@ -120,7 +120,7 @@ function togglePopup(material_id) { } else if ((neg) && (Properties::get_permissions(neg))) { WRITE(" of "); IXProperties::index_permissions(OUT, neg); } - if (neg) WRITE(", opposite of </i>%+W<i>", neg->name); + if (neg) WRITE(", opposite of </i>%+W<i>", neg->name); } void IXProperties::index_permissions(OUTPUT_STREAM, property *prn) { @@ -143,7 +143,7 @@ function togglePopup(material_id) { } diff --git a/docs/index-module/2-vrb.html b/docs/index-module/2-vrb.html index b77963a67..4b8269c3d 100644 --- a/docs/index-module/2-vrb.html +++ b/docs/index-module/2-vrb.html @@ -97,8 +97,8 @@ the following: Index::anchor(OUT, I"NAMES"); int understood_note_given = FALSE; LOOP_OVER(nlv, nonlocal_variable) - if ((Wordings::first_wn(nlv->name) >= 0) && (NonlocalVariables::is_global(nlv))) { - if (<value-understood-variable-name>(nlv->name)) + if ((Wordings::first_wn(nlv->name) >= 0) && (NonlocalVariables::is_global(nlv))) { + if (<value-understood-variable-name>(nlv->name)) Index a K understood variable2.1 else Index a regular variable2.2; @@ -121,7 +121,7 @@ the following:

    -    definition_area = Headings::of_wording(nlv->name);
    +    definition_area = Headings::of_wording(nlv->name);
         if (Headings::indexed(definition_area) == FALSE) continue;
         if (definition_area != current_area) {
             wording W = Headings::get_text(definition_area);
    @@ -138,8 +138,8 @@ the following:
     
     
     void IXVariables::index_one(OUTPUT_STREAM, nonlocal_variable *nlv) {
    -    WRITE("%+W", nlv->name);
    -    Index::link(OUT, Wordings::first_wn(nlv->name));
    +    WRITE("%+W", nlv->name);
    +    Index::link(OUT, Wordings::first_wn(nlv->name));
         if (Wordings::nonempty(nlv->var_documentation_symbol)) {
             TEMPORARY_TEXT(ixt)
             WRITE_TO(ixt, "%+W", Wordings::one_word(Wordings::first_wn(nlv->var_documentation_symbol)));
    @@ -152,7 +152,7 @@ the following:
     }
     
    diff --git a/docs/index-module/3-bck.html b/docs/index-module/3-bck.html index 3ddc02aa2..745c59c18 100644 --- a/docs/index-module/3-bck.html +++ b/docs/index-module/3-bck.html @@ -119,7 +119,7 @@ adds backdrop contents to a room called
  • This code is used in §1.
  • diff --git a/docs/index-module/3-bd.html b/docs/index-module/3-bd.html index d4eff1e00..9fd01ebc4 100644 --- a/docs/index-module/3-bd.html +++ b/docs/index-module/3-bd.html @@ -167,7 +167,7 @@ Contents listing, so: }
    diff --git a/docs/index-module/3-ef.html b/docs/index-module/3-ef.html index 21d6347b3..b04d74770 100644 --- a/docs/index-module/3-ef.html +++ b/docs/index-module/3-ef.html @@ -98,8 +98,8 @@ function togglePopup(material_id) { } WRITE("&nbsp;"); HTML::next_html_column(OUT, 0); - WRITE("%+W", exf->name); - Index::link(OUT, Wordings::first_wn(exf->name)); + WRITE("%+W", exf->name); + Index::link(OUT, Wordings::first_wn(exf->name)); HTML_TAG("br"); WRITE("Filename: %s %N- owned by ", (exf->file_is_binary)?"- binary ":"", @@ -119,7 +119,7 @@ function togglePopup(material_id) { } diff --git a/docs/index-module/3-fgr.html b/docs/index-module/3-fgr.html index 3ec5ffddf..21fc8a875 100644 --- a/docs/index-module/3-fgr.html +++ b/docs/index-module/3-fgr.html @@ -139,8 +139,8 @@ to match this width, preserving the aspect ratio. } HTML::next_html_column(OUT, 0); - WRITE("%+W", bf->name); - Index::link(OUT, Wordings::first_wn(bf->name)); + WRITE("%+W", bf->name); + Index::link(OUT, Wordings::first_wn(bf->name)); TEMPORARY_TEXT(rel) Filenames::to_text_relative(rel, bf->filename_of_image_file, @@ -165,7 +165,7 @@ to match this width, preserving the aspect ratio. } diff --git a/docs/index-module/3-rgn.html b/docs/index-module/3-rgn.html index 6795b8a07..0bc2a11b6 100644 --- a/docs/index-module/3-rgn.html +++ b/docs/index-module/3-rgn.html @@ -70,13 +70,13 @@ int IXRegions::add_to_World_index(OUTPUT_STREAM, instance *O) { if ((O) && (Instances::of_kind(O, K_room))) { instance *R = Regions::enclosing(O); - if (R) PL::HTMLMap::colour_chip(OUT, O, R, REGIONS_DATA(O)->in_region_set_at); + if (R) PL::HTMLMap::colour_chip(OUT, O, R, REGIONS_DATA(O)->in_region_set_at); } return FALSE; } diff --git a/docs/if-module/3-tm2.html b/docs/index-module/3-scn.html similarity index 57% rename from docs/if-module/3-tm2.html rename to docs/index-module/3-scn.html index 47f35f934..28eaa750c 100644 --- a/docs/if-module/3-tm2.html +++ b/docs/index-module/3-scn.html @@ -1,7 +1,7 @@ - Temporal Map + Scenes @@ -45,9 +45,9 @@ function togglePopup(material_id) {
  • knowledge
  • imperative
  • runtime
  • -
  • if
  • +
  • if
  • multimedia
  • -
  • index
  • +
  • index
  • Inter Modules

    - + +

    Parallel to the World index of space is the Scenes index of time, and in this section we render it as HTML.

    -
    +

    §1. The mapping of time is on the one hand simpler than the mapping of space since there is only one dimension, but on the other hand more complex since @@ -83,21 +83,21 @@ seems natural enough to learn in practice.

    -void PL::Scenes::Index::index(OUTPUT_STREAM) {
    -    int nr = NUMBER_CREATED(scene);
    -    scene **sorted = Memory::calloc(nr, sizeof(scene *), INDEX_SORTING_MREASON);
    -    Sort the scenes1.1;
    +void IXScenes::index(OUTPUT_STREAM) {
    +    int nr = NUMBER_CREATED(scene);
    +    scene **sorted = Memory::calloc(nr, sizeof(scene *), INDEX_SORTING_MREASON);
    +    Sort the scenes1.1;
     
    -    Tabulate the scenes1.2;
    -    Show the legend for the scene table icons1.3;
    -    Give details of each scene in turn1.5;
    +    Tabulate the scenes1.2;
    +    Show the legend for the scene table icons1.3;
    +    Give details of each scene in turn1.5;
     
    -    Memory::I7_array_free(sorted, INDEX_SORTING_MREASON, nr, sizeof(scene *));
    +    Memory::I7_array_free(sorted, INDEX_SORTING_MREASON, nr, sizeof(scene *));
     }
     
    -void PL::Scenes::Index::index_rules(OUTPUT_STREAM) {
    +void IXScenes::index_rules(OUTPUT_STREAM) {
         Rulebooks::index_scene(OUT);  rules in generic scene-ending rulebooks
    -    Show the generic scene-change rules1.4;
    +    Show the generic scene-change rules1.4;
     }
     

    §1.1. As usual, we sort with the C library's qsort. @@ -108,11 +108,11 @@ seems natural enough to learn in practice.

         int i = 0;
    -    scene *sc;
    -    LOOP_OVER(sc, scene) sorted[i++] = sc;
    -    qsort(sorted, (size_t) nr, sizeof(scene *), PL::Scenes::Index::compare_scenes);
    +    scene *sc;
    +    LOOP_OVER(sc, scene) sorted[i++] = sc;
    +    qsort(sorted, (size_t) nr, sizeof(scene *), IXScenes::compare_scenes);
     
    - +

    §1.2. The sorted ordering is used as-is later on, when we get to the details, but for the tabulation it's refined further. First we have the start-of-play scenes, in sorted order; then scenes with a condition for their beginning @@ -126,53 +126,52 @@ about and created but never made use of.)

    -    int i;
    -    for (i=0; i<nr; i++) {
    -        scene *sc = sorted[i];
    -        if ((sc->start_of_play) || (sc == SC_entire_game))
    -            PL::Scenes::Index::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr);
    +    for (int i=0; i<nr; i++) {
    +        scene *sc = sorted[i];
    +        if ((sc->start_of_play) || (sc == SC_entire_game))
    +            IXScenes::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr);
         }
    -    for (i=0; i<nr; i++) {
    -        scene *sc = sorted[i];
    -        if ((sc->anchor_condition[0]) && (sc != SC_entire_game))
    -            PL::Scenes::Index::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr);
    +    for (int i=0; i<nr; i++) {
    +        scene *sc = sorted[i];
    +        if ((sc->ends[0].anchor_condition) && (sc != SC_entire_game))
    +            IXScenes::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr);
         }
    -    for (i=0; i<nr; i++) {
    -        scene *sc = sorted[i];
    -        if (sc->indexed == FALSE)
    -            PL::Scenes::Index::index_from_scene(OUT, sc, 0, NEVER_HAPPENS_END, NULL, sorted, nr);
    +    for (int i=0; i<nr; i++) {
    +        scene *sc = sorted[i];
    +        if (sc->indexed == FALSE)
    +            IXScenes::index_from_scene(OUT, sc, 0, NEVER_HAPPENS_END, NULL, sorted, nr);
         }
     
    - +

    §1.3. Show the legend for the scene table icons1.3 =

         HTML_OPEN("p"); WRITE("Legend: ");
    -    PL::Scenes::Index::scene_icon_legend(OUT, "WPB", "Begins when play begins");
    +    IXScenes::scene_icon_legend(OUT, "WPB", "Begins when play begins");
         WRITE("; ");
    -    PL::Scenes::Index::scene_icon_legend(OUT, "WhenC", "can begin whenever some condition holds");
    +    IXScenes::scene_icon_legend(OUT, "WhenC", "can begin whenever some condition holds");
         WRITE("; ");
    -    PL::Scenes::Index::scene_icon_legend(OUT, "Segue", "follows when a previous scene ends");
    +    IXScenes::scene_icon_legend(OUT, "Segue", "follows when a previous scene ends");
         WRITE("; ");
    -    PL::Scenes::Index::scene_icon_legend(OUT, "Simul", "begins simultaneously");
    +    IXScenes::scene_icon_legend(OUT, "Simul", "begins simultaneously");
         WRITE("; ");
    -    PL::Scenes::Index::scene_icon_legend(OUT, "WNever", "never begins");
    +    IXScenes::scene_icon_legend(OUT, "WNever", "never begins");
         WRITE("; ");
    -    PL::Scenes::Index::scene_icon_legend(OUT, "ENever", "never ends");
    +    IXScenes::scene_icon_legend(OUT, "ENever", "never ends");
         WRITE("; ");
    -    PL::Scenes::Index::scene_icon_legend(OUT, "Recurring", "recurring (can happen more than once)");
    +    IXScenes::scene_icon_legend(OUT, "Recurring", "recurring (can happen more than once)");
         WRITE(". <i>Scene names are italicised when and if they appear for a second "
             "or subsequent time because the scene can begin in more than one way</i>.");
         HTML_CLOSE("p");
     
    - +

    §1.4. Show the generic scene-change rules1.4 =

         HTML_OPEN("p");
    -    Index::anchor(OUT, I"SRULES");
    +    Index::anchor(OUT, I"SRULES");
         WRITE("<b>General rules applying to scene changes</b>");
         HTML_CLOSE("p");
         Rulebooks::index_rules_box(OUT, "When a scene begins", EMPTY_WORDING, NULL,
    @@ -180,20 +179,19 @@ about and created but never made use of.)
         Rulebooks::index_rules_box(OUT, "When a scene ends", EMPTY_WORDING, NULL,
             built_in_rulebooks[WHEN_SCENE_ENDS_RB], NULL, NULL, 1, FALSE);
     
    - +

    §1.5. Give details of each scene in turn1.5 =

    -    Index::anchor(OUT, I"SDETAILS");
    -    int i;
    -    for (i=0; i<nr; i++) {
    +    Index::anchor(OUT, I"SDETAILS");
    +    for (int i=0; i<nr; i++) {
             HTML_TAG("hr");
    -        scene *sc = sorted[i];
    -        Give details of a specific scene1.5.1;
    +        scene *sc = sorted[i];
    +        Give details of a specific scene1.5.1;
         }
     
    - +

    §1.5.1. The curious condition about end 1 here is to avoid printing "Ends: Never" in cases where fancier ends for the scene exist, so that the scene can, in fact, end. @@ -203,34 +201,33 @@ fact, end.

    -    Index the name and recurrence status of the scene1.5.1.1;
    -    if (sc == SC_entire_game) Explain the Entire Game scene1.5.1.2;
    +    Index the name and recurrence status of the scene1.5.1.1;
    +    if (sc == SC_entire_game) Explain the Entire Game scene1.5.1.2;
     
    -    int end;
    -    for (end=0; end<sc->no_ends; end++) {
    -        if ((end == 1) && (sc->no_ends > 2) &&
    -            (sc->anchor_condition[1]==NULL) && (sc->anchor_scene[1]==NULL))
    +    for (int end=0; end<sc->no_ends; end++) {
    +        if ((end == 1) && (sc->no_ends > 2) &&
    +            (sc->ends[1].anchor_condition==NULL) && (sc->ends[1].anchor_connectors==NULL))
                 continue;
    -        Index the conditions for this scene end to occur1.5.1.4;
    -        Index the rules which apply when this scene end occurs1.5.1.5;
    -        if (end == 0) Index the rules which apply during this scene1.5.1.3;
    +        Index the conditions for this scene end to occur1.5.1.4;
    +        Index the rules which apply when this scene end occurs1.5.1.5;
    +        if (end == 0) Index the rules which apply during this scene1.5.1.3;
         }
     
    - +

    §1.5.1.1. Index the name and recurrence status of the scene1.5.1.1 =

         HTML::open_indented_p(OUT, 1, "hanging");
    -    Index::anchor_numbered(OUT, sc->allocation_id);
    -    WRITE("<b>The <i>%+W</i> scene</b>", PL::Scenes::get_name(sc));
    -    Index::link(OUT, Wordings::first_wn(Node::get_text(sc->scene_declared_at)));
    +    Index::anchor_numbered(OUT, sc->allocation_id);
    +    WRITE("<b>The <i>%+W</i> scene</b>", Scenes::get_name(sc));
    +    Index::link(OUT, Wordings::first_wn(Node::get_text(Instances::get_creating_sentence(sc->as_instance))));
         if (PropertyInferences::either_or_state(
    -        Instances::as_subject(sc->as_instance), P_recurring) > 0)
    +        Instances::as_subject(sc->as_instance), P_recurring) > 0)
             WRITE("&nbsp;&nbsp;<i>recurring</i>");
         HTML_CLOSE("p");
     
    - +

    §1.5.1.2. Explain the Entire Game scene1.5.1.2 =

    @@ -241,7 +238,7 @@ fact, end. "it too will end but then begin again.)"); HTML_CLOSE("p"); - +

    §1.5.1.3. Index the rules which apply during this scene1.5.1.3 =

    @@ -262,28 +259,28 @@ fact, end. } } - +

    §1.5.1.4. Index the conditions for this scene end to occur1.5.1.4 =

         HTML::open_indented_p(OUT, 1, "hanging");
         WRITE("<i>%s ", (end==0)?"Begins":"Ends");
    -    if (end >= 2) WRITE("%+W ", sc->end_names[end]);
    +    if (end >= 2) WRITE("%+W ", sc->ends[end].end_names);
         WRITE("when:</i> ");
         int count = 0;
    -    Index the play-begins condition1.5.1.4.1;
    -    Index the I7 condition for a scene to end1.5.1.4.2;
    -    Index connections to other scene ends1.5.1.4.3;
    +    Index the play-begins condition1.5.1.4.1;
    +    Index the I7 condition for a scene to end1.5.1.4.2;
    +    Index connections to other scene ends1.5.1.4.3;
         if (count == 0) WRITE("<b>never</b>");
         HTML_CLOSE("p");
     
    - +

    §1.5.1.4.1. Index the play-begins condition1.5.1.4.1 =

    -    if ((end==0) && (sc->start_of_play)) {
    +    if ((end==0) && (sc->start_of_play)) {
             if (count > 0) {
                 HTML_TAG("br");
                 WRITE("<i>or when:</i> ");
    @@ -292,52 +289,51 @@ fact, end.
             count++;
         }
     
    - +

    §1.5.1.4.2. Index the I7 condition for a scene to end1.5.1.4.2 =

    -    if (sc->anchor_condition[end]) {
    +    if (sc->ends[end].anchor_condition) {
             if (count > 0) {
                 HTML_TAG("br");
                 WRITE("<i>or when:</i> ");
             }
    -        WRITE("%+W", Node::get_text(sc->anchor_condition[end]));
    -        Index::link(OUT, Wordings::first_wn(Node::get_text(sc->anchor_condition_set[end])));
    +        WRITE("%+W", Node::get_text(sc->ends[end].anchor_condition));
    +        Index::link(OUT, Wordings::first_wn(Node::get_text(sc->ends[end].anchor_condition_set)));
             count++;
         }
     
    - +

    §1.5.1.4.3. Index connections to other scene ends1.5.1.4.3 =

    -    scene_connector *scon;
    -    for (scon = sc->anchor_scene[end]; scon; scon=scon->next) {
    +    for (scene_connector *scon = sc->ends[end].anchor_connectors; scon; scon=scon->next) {
             if (count > 0) {
                 HTML_TAG("br");
                 WRITE("<i>or when:</i> ");
             }
    -        wording NW = Instances::get_name(scon->connect_to->as_instance, FALSE);
    -        WRITE("<b>%+W</b> <i>%s</i>", NW, (scon->end==0)?"begins":"ends");
    -        if (scon->end >= 2) WRITE(" %+W", scon->connect_to->end_names[scon->end]);
    -        Index::link(OUT, Wordings::first_wn(Node::get_text(scon->where_said)));
    +        wording NW = Instances::get_name(scon->connect_to->as_instance, FALSE);
    +        WRITE("<b>%+W</b> <i>%s</i>", NW, (scon->end==0)?"begins":"ends");
    +        if (scon->end >= 2) WRITE(" %+W", scon->connect_to->ends[scon->end].end_names);
    +        Index::link(OUT, Wordings::first_wn(Node::get_text(scon->where_said)));
             count++;
         }
     
    - +

    §1.5.1.5. Index the rules which apply when this scene end occurs1.5.1.5 =

    -    if (Rulebooks::is_empty(sc->end_rulebook[end], Rulebooks::no_rule_context()) == FALSE) {
    +    if (Rulebooks::is_empty(sc->ends[end].end_rulebook, Rulebooks::no_rule_context()) == FALSE) {
             HTML::open_indented_p(OUT, 1, "hanging");
             WRITE("<i>What happens:</i>"); HTML_CLOSE("p");
             int ignore_me = 0;
    -        Rulebooks::index(OUT, sc->end_rulebook[end], "", Rulebooks::no_rule_context(), &ignore_me);
    +        Rulebooks::index(OUT, sc->ends[end].end_rulebook, "", Rulebooks::no_rule_context(), &ignore_me);
         }
     
    - +

    §2. Table of Scenes. We finally return to the table of scenes. The following is recursive, and is called at the top level for each scene in turn which starts at the start of play (see above). @@ -355,19 +351,19 @@ on the initial call when dept define NEVER_HAPPENS_END -2

    -void PL::Scenes::Index::index_from_scene(OUTPUT_STREAM, scene *sc, int depth,
    -    int end, scene *sc_from, scene **sorted, int nr) {
    +void IXScenes::index_from_scene(OUTPUT_STREAM, scene *sc, int depth,
    +    int end, scene *sc_from, scene **sorted, int nr) {
         HTML::open_indented_p(OUT, depth+1, "tight");
    -    Indicate the route by which this scene was reached2.1;
    -    Name the scene in the table, italicised if we've seen it already2.2;
    -    if (sc->indexed == FALSE) {
    -        Show the never-ends icon if appropriate2.3;
    -        Show the recurring icon if appropriate2.4;
    +    Indicate the route by which this scene was reached2.1;
    +    Name the scene in the table, italicised if we've seen it already2.2;
    +    if (sc->indexed == FALSE) {
    +        Show the never-ends icon if appropriate2.3;
    +        Show the recurring icon if appropriate2.4;
         }
         HTML_CLOSE("p");
    -    if (sc->indexed) return;
    -    sc->indexed = TRUE;
    -    Indent to tabulate other scenes connected to the ends of this one2.5;
    +    if (sc->indexed) return;
    +    sc->indexed = TRUE;
    +    Indent to tabulate other scenes connected to the ends of this one2.5;
     }
     

    §2.1. Indicate the route by which this scene was reached2.1 = @@ -375,52 +371,52 @@ on the initial call when dept

         switch(end) {
    -        case 0: PL::Scenes::Index::scene_icon(OUT, "Simul"); break;
    -        case 1: PL::Scenes::Index::scene_icon(OUT, "Segue"); break;
    +        case 0: IXScenes::scene_icon(OUT, "Simul"); break;
    +        case 1: IXScenes::scene_icon(OUT, "Segue"); break;
             case START_OF_PLAY_END: break;
    -        case NEVER_HAPPENS_END: PL::Scenes::Index::scene_icon(OUT, "WNever"); break;
    +        case NEVER_HAPPENS_END: IXScenes::scene_icon(OUT, "WNever"); break;
             default:
    -            PL::Scenes::Index::scene_icon(OUT, "Segue");
    -            WRITE("[ends %+W]&nbsp;", sc_from->end_names[end]); break;
    +            IXScenes::scene_icon(OUT, "Segue");
    +            WRITE("[ends %+W]&nbsp;", sc_from->ends[end].end_names); break;
         }
    -    if ((sc->indexed == FALSE) || (depth == 0)) {
    -        if (sc == SC_entire_game) PL::Scenes::Index::scene_icon(OUT, "WPB");
    -        else if (sc->anchor_condition[0]) PL::Scenes::Index::scene_icon(OUT, "WhenC");
    -        if (sc->start_of_play) PL::Scenes::Index::scene_icon(OUT, "WPB");
    +    if ((sc->indexed == FALSE) || (depth == 0)) {
    +        if (sc == SC_entire_game) IXScenes::scene_icon(OUT, "WPB");
    +        else if (sc->ends[0].anchor_condition) IXScenes::scene_icon(OUT, "WhenC");
    +        if (sc->start_of_play) IXScenes::scene_icon(OUT, "WPB");
         }
     
    - +

    §2.2. Name the scene in the table, italicised if we've seen it already2.2 =

    -    if (sc->indexed) WRITE("<i>");
    -    WRITE("%+W", Instances::get_name(sc->as_instance, FALSE));
    -    if (sc->indexed) WRITE("</i>");
    -    else Index::below_link_numbered(OUT, sc->allocation_id);
    +    if (sc->indexed) WRITE("<i>");
    +    WRITE("%+W", Instances::get_name(sc->as_instance, FALSE));
    +    if (sc->indexed) WRITE("</i>");
    +    else Index::below_link_numbered(OUT, sc->allocation_id);
     
    - +

    §2.3. Show the never-ends icon if appropriate2.3 =

    -    int ways_to_end = 0, e;
    -    for (e=1; e<sc->no_ends; e++) {
    -        if (sc->anchor_scene[e]) ways_to_end++;
    -        if (sc->anchor_condition[e]) ways_to_end++;
    +    int ways_to_end = 0;
    +    for (int e=1; e<sc->no_ends; e++) {
    +        if (sc->ends[e].anchor_connectors) ways_to_end++;
    +        if (sc->ends[e].anchor_condition) ways_to_end++;
         }
    -    if (ways_to_end == 0) PL::Scenes::Index::scene_icon_append(OUT, "ENever");
    +    if (ways_to_end == 0) IXScenes::scene_icon_append(OUT, "ENever");
     
    - +

    §2.4. Show the recurring icon if appropriate2.4 =

    -    inference_subject *subj = Instances::as_subject(sc->as_instance);
    +    inference_subject *subj = Instances::as_subject(sc->as_instance);
         if (PropertyInferences::either_or_state(subj, P_recurring) > UNKNOWN_CE)
    -        PL::Scenes::Index::scene_icon_append(OUT, "Recurring");
    +        IXScenes::scene_icon_append(OUT, "Recurring");
     
    - +

    §2.5. And this is where the routine recurses, so that consequent scenes are tabulated underneath the present one, indented one step further in (since indentation is coupled to depth). First we recurse to scenes which end when @@ -431,40 +427,39 @@ this one does; then to scenes which begin when this one ends.

    -    int i;
    -    for (i=0; i<nr; i++) {
    -        scene *sc2 = sorted[i];
    -        scene_connector *scon;
    -        for (scon = sc2->anchor_scene[0]; scon; scon=scon->next)
    -            if ((scon->connect_to == sc) && (scon->end >= 1))
    -                PL::Scenes::Index::index_from_scene(OUT, sc2, depth + 1, scon->end, sc, sorted, nr);
    +    for (int i=0; i<nr; i++) {
    +        scene *sc2 = sorted[i];
    +        scene_connector *scon;
    +        for (scon = sc2->ends[0].anchor_connectors; scon; scon=scon->next)
    +            if ((scon->connect_to == sc) && (scon->end >= 1))
    +                IXScenes::index_from_scene(OUT, sc2, depth + 1, scon->end, sc, sorted, nr);
         }
    -    for (i=0; i<nr; i++) {
    -        scene *sc2 = sorted[i];
    -        scene_connector *scon;
    -        for (scon = sc2->anchor_scene[0]; scon; scon=scon->next)
    -            if ((scon->connect_to == sc) && (scon->end == 0))
    -                PL::Scenes::Index::index_from_scene(OUT, sc2, depth, scon->end, sc, sorted, nr);
    +    for (int i=0; i<nr; i++) {
    +        scene *sc2 = sorted[i];
    +        scene_connector *scon;
    +        for (scon = sc2->ends[0].anchor_connectors; scon; scon=scon->next)
    +            if ((scon->connect_to == sc) && (scon->end == 0))
    +                IXScenes::index_from_scene(OUT, sc2, depth, scon->end, sc, sorted, nr);
         }
     
    - +

    §3. We have been using:

    -void PL::Scenes::Index::scene_icon(OUTPUT_STREAM, char *si) {
    -    PL::Scenes::Index::scene_icon_unspaced(OUT, si); WRITE("&nbsp;&nbsp;");
    +void IXScenes::scene_icon(OUTPUT_STREAM, char *si) {
    +    IXScenes::scene_icon_unspaced(OUT, si); WRITE("&nbsp;&nbsp;");
     }
     
    -void PL::Scenes::Index::scene_icon_append(OUTPUT_STREAM, char *si) {
    -    WRITE("&nbsp;&nbsp;"); PL::Scenes::Index::scene_icon_unspaced(OUT, si);
    +void IXScenes::scene_icon_append(OUTPUT_STREAM, char *si) {
    +    WRITE("&nbsp;&nbsp;"); IXScenes::scene_icon_unspaced(OUT, si);
     }
     
    -void PL::Scenes::Index::scene_icon_legend(OUTPUT_STREAM, char *si, char *gloss) {
    -    PL::Scenes::Index::scene_icon_unspaced(OUT, si); WRITE("&nbsp;<i>%s</i>", gloss);
    +void IXScenes::scene_icon_legend(OUTPUT_STREAM, char *si, char *gloss) {
    +    IXScenes::scene_icon_unspaced(OUT, si); WRITE("&nbsp;<i>%s</i>", gloss);
     }
     
    -void PL::Scenes::Index::scene_icon_unspaced(OUTPUT_STREAM, char *si) {
    +void IXScenes::scene_icon_unspaced(OUTPUT_STREAM, char *si) {
         HTML_TAG_WITH("img", "border=0 src=inform:/scene_icons/%s.png", si);
     }
     
    @@ -474,18 +469,18 @@ rest in ascending alphabetical order.

    -int PL::Scenes::Index::compare_scenes(const void *ent1, const void *ent2) {
    -    const scene *sc1 = *((const scene **) ent1);
    -    const scene *sc2 = *((const scene **) ent2);
    +int IXScenes::compare_scenes(const void *ent1, const void *ent2) {
    +    const scene *sc1 = *((const scene **) ent1);
    +    const scene *sc2 = *((const scene **) ent2);
         if ((sc1 == SC_entire_game) && (sc2 != SC_entire_game)) return -1;
         if ((sc1 != SC_entire_game) && (sc2 == SC_entire_game)) return 1;
    -    wording SW1 = Instances::get_name(sc1->as_instance, FALSE);
    -    wording SW2 = Instances::get_name(sc2->as_instance, FALSE);
    +    wording SW1 = Instances::get_name(sc1->as_instance, FALSE);
    +    wording SW2 = Instances::get_name(sc2->as_instance, FALSE);
         return Wordings::strcmp(SW1, SW2);
     }
     
    diff --git a/docs/index-module/3-se.html b/docs/index-module/3-se.html index 2505c67f6..d53afe1c5 100644 --- a/docs/index-module/3-se.html +++ b/docs/index-module/3-se.html @@ -175,8 +175,8 @@ function togglePopup(material_id) { } WRITE("&nbsp;"); HTML::next_html_column(OUT, 0); - WRITE("%+W", bs->name); - Index::link(OUT, Wordings::first_wn(bs->name)); + WRITE("%+W", bs->name); + Index::link(OUT, Wordings::first_wn(bs->name)); TEMPORARY_TEXT(rel) Filenames::to_text_relative(rel, bs->filename_of_sound_file, Projects::materials_path(Task::project())); @@ -191,7 +191,7 @@ function togglePopup(material_id) { } diff --git a/docs/index-module/3-spt.html b/docs/index-module/3-spt.html index 58e16e603..2d2cb52e1 100644 --- a/docs/index-module/3-spt.html +++ b/docs/index-module/3-spt.html @@ -165,7 +165,7 @@ it already turns up under its owner. } diff --git a/docs/index-module/3-tm.html b/docs/index-module/3-tm.html index 7e1a32d56..75cb9c666 100644 --- a/docs/index-module/3-tm.html +++ b/docs/index-module/3-tm.html @@ -69,7 +69,7 @@
     int IXMap::add_to_World_index(OUTPUT_STREAM, instance *O) {
         if ((O) && (Instances::of_kind(O, K_room))) {
    -        PL::SpatialMap::index_room_connections(OUT, O);
    +        PL::SpatialMap::index_room_connections(OUT, O);
         }
         return FALSE;
     }
    @@ -96,7 +96,7 @@
     }
     
    diff --git a/docs/index-module/3-tp.html b/docs/index-module/3-tp.html index d2482fa24..283582105 100644 --- a/docs/index-module/3-tp.html +++ b/docs/index-module/3-tp.html @@ -93,7 +93,7 @@ usually appear anywhere. } diff --git a/docs/if-module/3-em.html b/docs/index-module/4-em.html similarity index 92% rename from docs/if-module/3-em.html rename to docs/index-module/4-em.html index 8a3f59d9b..61e3f51c8 100644 --- a/docs/if-module/3-em.html +++ b/docs/index-module/4-em.html @@ -60,9 +60,9 @@ function togglePopup(material_id) {
  • knowledge
  • imperative
  • runtime
  • -
  • if
  • +
  • if
  • multimedia
  • -
  • index
  • +
  • index
  • Inter Modules

    Inter Modules

    Inter Modules

    Inter Modules

    + +
  • +

    + Chapter 4: Visualising Space

    +
  • diff --git a/docs/runtime-module/2-emt.html b/docs/runtime-module/2-emt.html index 772b9aff9..451df76ff 100644 --- a/docs/runtime-module/2-emt.html +++ b/docs/runtime-module/2-emt.html @@ -84,7 +84,7 @@ function togglePopup(material_id) { inter_tree *I7_generation_tree = NULL; -inter_tree *Emit::tree(void) { +inter_tree *Emit::tree(void) { return I7_generation_tree; } @@ -342,14 +342,14 @@ insert them into the Inter stream close to the top. Emit::named_generic_constant(name, v1, v2); } -void Emit::named_generic_constant(inter_name *name, inter_ti val1, inter_ti val2) { +void Emit::named_generic_constant(inter_name *name, inter_ti val1, inter_ti val2) { packaging_state save = Packaging::enter_home_of(name); inter_symbol *con_name = Produce::define_symbol(name); Produce::guard(Inter::Constant::new_numerical(Packaging::at(Emit::tree()), Inter::SymbolsTables::id_from_IRS_and_symbol(Packaging::at(Emit::tree()), con_name), Inter::SymbolsTables::id_from_IRS_and_symbol(Packaging::at(Emit::tree()), unchecked_interk), val1, val2, Produce::baseline(Packaging::at(Emit::tree())), NULL)); Packaging::exit(Emit::tree(), save); } -inter_name *Emit::named_numeric_constant(inter_name *name, inter_ti val) { +inter_name *Emit::named_numeric_constant(inter_name *name, inter_ti val) { packaging_state save = Packaging::enter_home_of(name); inter_symbol *con_name = Produce::define_symbol(name); Produce::guard(Inter::Constant::new_numerical(Packaging::at(Emit::tree()), Inter::SymbolsTables::id_from_IRS_and_symbol(Packaging::at(Emit::tree()), con_name), Inter::SymbolsTables::id_from_IRS_and_symbol(Packaging::at(Emit::tree()), int_interk), LITERAL_IVAL, val, Produce::baseline(Packaging::at(Emit::tree())), NULL)); @@ -617,7 +617,7 @@ insert them into the Inter stream close to the top. Packaging::exit(Emit::tree(), save); } -inter_name *Emit::named_iname_constant(inter_name *name, kind *K, inter_name *iname) { +inter_name *Emit::named_iname_constant(inter_name *name, kind *K, inter_name *iname) { packaging_state save = Packaging::enter_home_of(name); inter_symbol *con_name = Produce::define_symbol(name); inter_symbol *val_kind = Produce::kind_to_symbol(K); diff --git a/docs/runtime-module/2-hrr.html b/docs/runtime-module/2-hrr.html index a9f981e3d..9ac99b7e4 100644 --- a/docs/runtime-module/2-hrr.html +++ b/docs/runtime-module/2-hrr.html @@ -1723,11 +1723,11 @@ function togglePopup(material_id) {

    §4.

    -inter_name *Hierarchy::find(int id) {
    +inter_name *Hierarchy::find(int id) {
         return HierarchyLocations::find(Emit::tree(), id);
     }
     
    -void Hierarchy::make_available(inter_tree *I, inter_name *iname) {
    +void Hierarchy::make_available(inter_tree *I, inter_name *iname) {
         text_stream *ma_as = Produce::get_translation(iname);
         if (Str::len(ma_as) == 0) ma_as = Emit::to_text(iname);
         PackageTypes::get(I, I"_linkage");
    diff --git a/docs/runtime-module/4-epv.html b/docs/runtime-module/4-epv.html
    index e46846271..505143647 100644
    --- a/docs/runtime-module/4-epv.html
    +++ b/docs/runtime-module/4-epv.html
    @@ -295,7 +295,7 @@ the following.
     void RTPropertyValues::emit_iname_has_property(kind *K, inter_name *N, property *prn) {
         RTPropertyValues::emit_has_property(K, InterNames::to_symbol(N), prn);
     }
    -void RTPropertyValues::emit_has_property(kind *K, inter_symbol *S, property *prn) {
    +void RTPropertyValues::emit_has_property(kind *K, inter_symbol *S, property *prn) {
         if (RTProperties::implemented_as_attribute(prn)) {
             if (RTProperties::stored_in_negation(prn)) {
                 Produce::inv_primitive(Emit::tree(), NOT_BIP);
    @@ -380,7 +380,7 @@ the property-permission symbol accordingly:
     

    -inter_name *RTPropertyValues::annotate_table_storage(property_permission *pp) {
    +inter_name *RTPropertyValues::annotate_table_storage(property_permission *pp) {
         property_of_value_storage *povs =
             RETRIEVE_POINTER_property_of_value_storage(PropertyPermissions::get_storage_data(pp));
         return povs->storage_table_iname;
    diff --git a/docs/runtime-module/4-prp.html b/docs/runtime-module/4-prp.html
    index 0032047c7..06ec84526 100644
    --- a/docs/runtime-module/4-prp.html
    +++ b/docs/runtime-module/4-prp.html
    @@ -138,7 +138,7 @@ property also visits its negation.)
         prn->compilation_data.do_not_compile = TRUE;
     }
     
    -int RTProperties::can_be_compiled(property *prn) {
    +int RTProperties::can_be_compiled(property *prn) {
         if ((prn == NULL) || (prn->compilation_data.do_not_compile)) return FALSE;
         return TRUE;
     }
    @@ -157,7 +157,7 @@ property also visits its negation.)
     

    §4.

    -int RTProperties::stored_in_negation(property *prn) {
    +int RTProperties::stored_in_negation(property *prn) {
         if ((prn == NULL) || (prn->either_or_data == NULL)) internal_error("non-EO property");
         return prn->compilation_data.store_in_negation;
     }
    @@ -233,7 +233,7 @@ run-time support code to work.
     

    §6. Emitting to Inter.

    -inter_name *RTProperties::iname(property *prn) {
    +inter_name *RTProperties::iname(property *prn) {
         if (prn == NULL) internal_error("tried to find iname for null property");
         if ((Properties::is_either_or(prn)) && (prn->compilation_data.store_in_negation))
             return RTProperties::iname(EitherOrProperties::get_negation(prn));
    @@ -394,7 +394,7 @@ all to work; the following keep a flag to mark that.
         prn->compilation_data.use_non_typesafe_0 = TRUE;
     }
     
    -int RTProperties::uses_non_typesafe_0(property *prn) {
    +int RTProperties::uses_non_typesafe_0(property *prn) {
         if ((prn == NULL) || (prn->either_or_data)) internal_error("non-value property");
         return prn->compilation_data.use_non_typesafe_0;
     }
    diff --git a/docs/runtime-module/4-rsfk.html b/docs/runtime-module/4-rsfk.html
    index eee5ccb11..ebca1cfbf 100644
    --- a/docs/runtime-module/4-rsfk.html
    +++ b/docs/runtime-module/4-rsfk.html
    @@ -620,7 +620,7 @@ which might occupy up to 31 characters, the maximum length of an I6 identifier:
         else Emit::array_numeric_entry((inter_ti) (RTKinds::weak_id(K)));
     }
     
    -void RTKinds::emit_weak_id_as_val(kind *K) {
    +void RTKinds::emit_weak_id_as_val(kind *K) {
         if (K == NULL) internal_error("cannot emit null kind as val");
         kind_constructor *con = Kinds::get_construct(K);
         inter_name *iname = Kinds::Constructors::iname(con);
    diff --git a/docs/runtime-module/4-rsft.html b/docs/runtime-module/4-rsft.html
    index acb469920..5d7c579a8 100644
    --- a/docs/runtime-module/4-rsft.html
    +++ b/docs/runtime-module/4-rsft.html
    @@ -143,7 +143,7 @@ kind as a strong kind ID.
         Hierarchy::markup_wording(t->table_package, TABLE_NAME_HMD, W);
     }
     
    -inter_name *RTTables::identifier(table *t) {
    +inter_name *RTTables::identifier(table *t) {
         return t->table_identifier;
     }
     
    diff --git a/docs/runtime-module/4-rtn.html b/docs/runtime-module/4-rtn.html index 6539f14b2..4cfee0433 100644 --- a/docs/runtime-module/4-rtn.html +++ b/docs/runtime-module/4-rtn.html @@ -81,7 +81,7 @@ already been set up, or not. Here's not:

    -packaging_state Routines::begin(inter_name *name) {
    +packaging_state Routines::begin(inter_name *name) {
         return Routines::begin_framed(name, NULL);
     }
     
    @@ -140,7 +140,7 @@ did not.

    -void Routines::end(packaging_state save) {
    +void Routines::end(packaging_state save) {
         kind *R_kind = LocalVariables::deduced_function_kind(currently_compiling_in_frame);
     
         inter_name *kernel_name = NULL, *public_name = currently_compiling_iname;
    diff --git a/docs/runtime-module/4-ts2.html b/docs/runtime-module/4-ts2.html
    index 70e7d66de..ac96e4ff6 100644
    --- a/docs/runtime-module/4-ts2.html
    +++ b/docs/runtime-module/4-ts2.html
    @@ -92,7 +92,7 @@ stipulations on place and possessions attached.
         CLASS_DEFINITION
     } test_scenario;
     
    -
    • The structure test_scenario is accessed in 4/rsp, 4/uoart, 4/vrb, 4/prp and here.
    +
    • The structure test_scenario is accessed in 4/rsp, 4/uoart, 4/vrb, 4/prp, 5/sc and here.

    §2.

    diff --git a/docs/runtime-module/4-vrb.html b/docs/runtime-module/4-vrb.html
    index 0a7756c0c..6bafd93cd 100644
    --- a/docs/runtime-module/4-vrb.html
    +++ b/docs/runtime-module/4-vrb.html
    @@ -397,7 +397,7 @@ which makes its kind safe. Hence the error messages.
         Holsters::to_val_mode(Emit::tree(), &VH);
     }
     
    -void RTVariables::seek_initial_value(inter_name *iname, inter_ti *v1,
    +void RTVariables::seek_initial_value(inter_name *iname, inter_ti *v1,
         inter_ti *v2, nonlocal_variable *nlv) {
         ival_emission IE = Emit::begin_ival_emission(iname);
         RTVariables::compile_initial_value_vh(Emit::ival_holster(&IE), nlv);
    diff --git a/docs/runtime-module/5-bck.html b/docs/runtime-module/5-bck.html
    index e49e261eb..e4a090d1e 100644
    --- a/docs/runtime-module/5-bck.html
    +++ b/docs/runtime-module/5-bck.html
    @@ -142,7 +142,7 @@
     
    • This code is used in §2.
    diff --git a/docs/runtime-module/5-bd.html b/docs/runtime-module/5-bd.html index d750a53cb..40de54938 100644 --- a/docs/runtime-module/5-bd.html +++ b/docs/runtime-module/5-bd.html @@ -211,7 +211,7 @@ around it, in byte-accessible memory. }
    diff --git a/docs/runtime-module/5-ef.html b/docs/runtime-module/5-ef.html index f47c9942f..b137b923c 100644 --- a/docs/runtime-module/5-ef.html +++ b/docs/runtime-module/5-ef.html @@ -129,7 +129,7 @@
    diff --git a/docs/runtime-module/5-fgr.html b/docs/runtime-module/5-fgr.html index ed14aabd8..cfd869586 100644 --- a/docs/runtime-module/5-fgr.html +++ b/docs/runtime-module/5-fgr.html @@ -77,7 +77,7 @@ }
    diff --git a/docs/runtime-module/5-nmn.html b/docs/runtime-module/5-nmn.html index cf9f87db5..d6a541be3 100644 --- a/docs/runtime-module/5-nmn.html +++ b/docs/runtime-module/5-nmn.html @@ -186,7 +186,7 @@ function togglePopup(material_id) { diff --git a/docs/runtime-module/5-prs.html b/docs/runtime-module/5-prs.html index cbe0633ae..fda49ba30 100644 --- a/docs/runtime-module/5-prs.html +++ b/docs/runtime-module/5-prs.html @@ -148,7 +148,7 @@ for the kinds we inherit from. } diff --git a/docs/runtime-module/5-rgn.html b/docs/runtime-module/5-rgn.html index a98defa03..0c2a03f75 100644 --- a/docs/runtime-module/5-rgn.html +++ b/docs/runtime-module/5-rgn.html @@ -108,7 +108,7 @@ function togglePopup(material_id) { } diff --git a/docs/if-module/3-sc.html b/docs/runtime-module/5-sc.html similarity index 52% rename from docs/if-module/3-sc.html rename to docs/runtime-module/5-sc.html index 6599d823b..be68c92f7 100644 --- a/docs/if-module/3-sc.html +++ b/docs/runtime-module/5-sc.html @@ -44,8 +44,8 @@ function togglePopup(material_id) {
  • values
  • knowledge
  • imperative
  • -
  • runtime
  • -
  • if
  • +
  • runtime
  • +
  • if
  • multimedia
  • index
  • Inter Modules

    diff --git a/inform7/Downloads/preform-diagnostics.txt b/inform7/Downloads/preform-diagnostics.txt index cbbabb812..8f56b4db6 100644 --- a/inform7/Downloads/preform-diagnostics.txt +++ b/inform7/Downloads/preform-diagnostics.txt @@ -1,6 +1,6 @@ internal nti 19 constraint (none) extremes [1, 1] - internal hits 1207/7770 nti 20 constraint (none) extremes [0, 0] + internal hits 1153/6330 nti 20 constraint (none) extremes [0, 0] internal hits 3873/7958 nti 21 constraint (none) extremes [0, 0] @@ -4728,7 +4728,7 @@ twelfth constraint CS = {27} extremes [1, 1] - internal hits 200/22254 nti r0 constraint CS = {r0} extremes [1, 1] + internal hits 200/22268 nti r0 constraint CS = {r0} extremes [1, 1] internal nti r1 constraint CS = {r1} extremes [1, 1] @@ -4764,9 +4764,9 @@
    internal hits 16200/96518 nti r2 constraint (none) extremes [1, 1] - internal hits 21559/254484 nti r2 constraint (none) extremes [1, 1] + internal hits 21513/254390 nti r2 constraint (none) extremes [1, 1] - internal hits 2232/40622 nti r2 constraint (none) extremes [1, 1] + internal hits 2115/40360 nti r2 constraint (none) extremes [1, 1] nti r2 constraint CS = {r2} extremes [6, 6] English: @@ -4830,7 +4830,7 @@ hits 16/21706 nti 29 constraint DS = {29} extremes [2, infinity) English: not {...} - (hits 16/6241) (matched long text) constraint DS = {29} extremes [2, infinity) + (hits 16/6033) (matched long text) constraint DS = {29} extremes [2, infinity) hits 79/158 nti 30 constraint (none) extremes [1, infinity) English: @@ -4844,7 +4844,7 @@ hits 0/21422 nti 31 constraint DS = {31} extremes [2, infinity) English: no one {***} - (hits 0/6411) constraint DS = {31} extremes [2, infinity) + (hits 0/6312) constraint DS = {31} extremes [2, infinity) internal hits 92/1190 nti 18 constraint (none) extremes [1, 1] @@ -4911,13 +4911,13 @@ here here here here here here constraint CS = {12} extremes [6, 6] - internal hits 4130/9188 nti 6 constraint FS = {6} extremes [1, infinity) + internal hits 4130/9172 nti 6 constraint FS = {6} extremes [1, infinity) internal hits 16/128 nti 7 constraint FS = {7} extremes [1, infinity) - internal hits 1/8498 nti 8 constraint FS = {8} extremes [1, infinity) + internal hits 1/8428 nti 8 constraint FS = {8} extremes [1, infinity) - internal hits 0/2264 nti 9 constraint FS = {9} extremes [1, infinity) + internal hits 0/1676 nti 9 constraint FS = {9} extremes [1, infinity) internal nti 10 constraint FS = {10} extremes [1, infinity) @@ -4935,22 +4935,22 @@ internal nti 12 constraint DS = {12} extremes [1, infinity) - internal hits 635/17548 nti 13 constraint DS = {13} extremes [1, infinity) + internal hits 635/17746 nti 13 constraint DS = {13} extremes [1, infinity) - internal hits 258/8464 nti 14 constraint DS = {14} extremes [1, infinity) + internal hits 258/8500 nti 14 constraint DS = {14} extremes [1, infinity) - hits 67/4422 nti 13 constraint CS = {13} extremes [1, 1] + hits 67/4456 nti 13 constraint CS = {13} extremes [1, 1] English: always/certainly - (hits 10/1117) (matched: 'always') constraint CS = {13} extremes [1, 1] + (hits 10/1268) (matched: 'always') constraint CS = {13} extremes [1, 1] usually/normally - (hits 53/1107) (matched: 'usually') constraint CS = {13} extremes [1, 1] + (hits 53/1258) (matched: 'usually') constraint CS = {13} extremes [1, 1] rarely/seldom - (hits 0/1054) constraint CS = {13} extremes [1, 1] + (hits 0/1205) constraint CS = {13} extremes [1, 1] never - (hits 4/1054) (matched: 'never') constraint CS = {13} extremes [1, 1] + (hits 4/1205) (matched: 'never') constraint CS = {13} extremes [1, 1] initially - (hits 0/1050) constraint CS = {13} extremes [1, 1] + (hits 0/1201) constraint CS = {13} extremes [1, 1] hits 0/4304 nti 14 constraint DS = {14} extremes [1, infinity) English: @@ -5031,10 +5031,10 @@ (hits 60/60) (matched: 'fixed in place') constraint (none) extremes [1, infinity) - hits 33/109570 nti 19 constraint CS = {19} extremes [1, 1] + hits 33/109582 nti 19 constraint CS = {19} extremes [1, 1] English: there - (hits 33/451) (matched: 'there') constraint CS = {19} extremes [1, 1] + (hits 33/269) (matched: 'there') constraint CS = {19} extremes [1, 1] hits 2081/4162 nti 9 constraint (none) extremes [1, infinity) English: @@ -5059,27 +5059,27 @@ {...} (hits 99/279) (matched long text) constraint (none) extremes [1, infinity) - (hits 99/135) (matched long text) constraint DS = {20} extremes [2, infinity) + (hits 99/151) (matched long text) constraint DS = {20} extremes [2, infinity) (hits 81/81) (matched long text) constraint (none) extremes [1, infinity) - hits 198/1204 nti 20 constraint DS = {20} extremes [2, infinity) + hits 198/1288 nti 20 constraint DS = {20} extremes [2, infinity) English: , _{and} - (hits 0/530) constraint DS = {20} extremes [3, infinity) + (hits 0/538) constraint DS = {20} extremes [3, infinity) _{,/and} - (hits 198/566) (matched long text) constraint DS = {20} extremes [2, infinity) + (hits 198/588) (matched long text) constraint DS = {20} extremes [2, infinity) hits 103/206 nti 12 constraint (none) extremes [1, infinity) English: {...} (hits 30/103) (matched: 'unmarked for listing') constraint (none) extremes [1, infinity) - (hits 30/33) (matched: 'marked for listing or unmarked for listing') constraint DS = {21} extremes [2, infinity) + (hits 30/32) (matched: 'marked for listing or unmarked for listing') constraint DS = {21} extremes [2, infinity) (hits 43/43) (matched: 'pushable between rooms') constraint (none) extremes [1, infinity) - hits 60/144 nti 21 constraint DS = {21} extremes [2, infinity) + hits 60/142 nti 21 constraint DS = {21} extremes [2, infinity) English: , _{or} (hits 0/13) constraint DS = {21} extremes [3, infinity) @@ -5109,7 +5109,7 @@ {***} (hits 0/453) constraint (none) extremes [1, infinity) - (hits 0/375) constraint DS = {14} extremes [2, infinity) + (hits 0/381) constraint DS = {14} extremes [2, infinity) hits 0/1962 nti 16 constraint (none) extremes [1, infinity) English: @@ -5134,27 +5134,27 @@ initially carried constraint CS = {22} extremes [2, 2] - hits 0/2712 nti 28 constraint DS = {14} extremes [2, infinity) + hits 0/2724 nti 28 constraint DS = {14} extremes [2, infinity) English: _,/and {...} - (hits 0/651) constraint DS = {14, 28} extremes [3, infinity) + (hits 0/559) constraint DS = {14, 28} extremes [3, infinity) _,/and - (hits 0/898) constraint DS = {14, 28} extremes [2, infinity) + (hits 0/672) constraint DS = {14, 28} extremes [2, infinity) - (hits 0/927) constraint DS = {14} extremes [2, infinity) + (hits 0/945) constraint DS = {14} extremes [2, infinity) hits 1467/2934 nti 27 constraint (none) extremes [1, infinity) English: {...} (hits 174/1467) (matched long text) constraint (none) extremes [1, infinity) {called} - (hits 57/422) (matched long text) constraint DS = {27} extremes [1, infinity) + (hits 57/470) (matched long text) constraint DS = {27} extremes [1, infinity) - (hits 0/755) constraint DS = {24} extremes [2, infinity) + (hits 0/747) constraint DS = {24} extremes [2, infinity) (hits 87/497) (matched long text) constraint DS = {25} extremes [1, infinity) - (hits 30/269) (matched: 'a kind of supporter that is portable') constraint DS = {26} extremes [1, infinity) + (hits 30/267) (matched: 'a kind of supporter that is portable') constraint DS = {26} extremes [1, infinity) (hits 4/349) (matched: 'it') constraint (none) extremes [1, 1] @@ -5171,16 +5171,16 @@ (hits 431/431) (matched long text) constraint (none) extremes [1, infinity) - hits 0/10946 nti 24 constraint DS = {24} extremes [2, infinity) + hits 0/10894 nti 24 constraint DS = {24} extremes [2, infinity) English: it with action {***} - (hits 0/3987) constraint DS = {24} extremes [3, infinity) + (hits 0/3906) constraint DS = {24} extremes [3, infinity) {with/having} (/) {***} - (hits 0/4248) constraint DS = {24} extremes [2, infinity) + (hits 0/4107) constraint DS = {24} extremes [2, infinity) {with/having} {...} ( ) - (hits 0/3516) constraint DS = {24} extremes [5, infinity) + (hits 0/3508) constraint DS = {24} extremes [5, infinity) {with/having} - (hits 0/4248) constraint DS = {24} extremes [2, infinity) + (hits 0/4107) constraint DS = {24} extremes [2, infinity) nti 19 constraint (none) extremes [1, infinity) English: @@ -5206,23 +5206,23 @@ hits 174/3542 nti 25 constraint DS = {25} extremes [1, infinity) English: , _{and} - (hits 8/934) (matched: ', and didn't understand addressee's last name error') constraint DS = {25} extremes [2, infinity) + (hits 8/940) (matched: ', and didn't understand addressee's last name error') constraint DS = {25} extremes [2, infinity) _{,/and} - (hits 166/946) (matched long text) constraint DS = {25} extremes [1, infinity) + (hits 166/952) (matched long text) constraint DS = {25} extremes [1, infinity) - hits 30/538 nti 21 constraint DS = {26} extremes [1, infinity) + hits 30/534 nti 21 constraint DS = {26} extremes [1, infinity) English: - (hits 30/268) (matched: 'a kind of supporter that is portable') constraint DS = {26} extremes [2, infinity) + (hits 30/267) (matched: 'a kind of supporter that is portable') constraint DS = {26} extremes [2, infinity) - (hits 0/239) constraint DS = {26} extremes [1, infinity) + (hits 0/237) constraint DS = {26} extremes [1, infinity) - hits 30/644 nti 26 constraint DS = {26} extremes [1, infinity) + hits 30/638 nti 26 constraint DS = {26} extremes [1, infinity) English: kind/kinds - (hits 4/39) (matched: 'kind') constraint CS = {26} extremes [1, 1] + (hits 4/38) (matched: 'kind') constraint CS = {26} extremes [1, 1] kind/kinds of - (hits 26/283) (matched: 'kind of supporter that is portable') constraint DS = {26} extremes [2, infinity) + (hits 26/281) (matched: 'kind of supporter that is portable') constraint DS = {26} extremes [2, infinity) internal nti 22 constraint (none) extremes [1, infinity) @@ -5231,22 +5231,22 @@ hits 0/2764 nti 24 constraint DS = {13} extremes [2, infinity) English: {...} - (hits 0/1030) constraint DS = {13} extremes [2, infinity) + (hits 0/1027) constraint DS = {13} extremes [2, infinity) hits 67/2764 nti 25 constraint DS = {13} extremes [2, infinity) English: {...} - (hits 67/1181) (matched: 'usually table of general chitchat') constraint DS = {13} extremes [2, infinity) + (hits 67/1201) (matched: 'usually table of general chitchat') constraint DS = {13} extremes [2, infinity) - hits 773/25152 nti 30 constraint CS = {30} extremes [1, 1] + hits 667/24456 nti 30 constraint CS = {30} extremes [1, 1] English: which/who/that - (hits 773/5646) (matched: 'which') constraint CS = {30} extremes [1, 1] + (hits 667/5725) (matched: 'which') constraint CS = {30} extremes [1, 1] hits 2/2742 nti 26 constraint DS = {30} extremes [2, infinity) English: {...} - (hits 2/793) (matched: 'answering it that') constraint DS = {30} extremes [2, infinity) + (hits 2/792) (matched: 'answering it that') constraint DS = {30} extremes [2, infinity) nti 31 constraint DS = {31} extremes [3, infinity) English: @@ -5256,7 +5256,7 @@ hits 196/9062 nti 6 constraint DS = {6} extremes [2, infinity) English: of {...} - (hits 196/2512) (matched: 'of day -- documented at var_time --') constraint DS = {6} extremes [2, infinity) + (hits 196/2515) (matched: 'of day -- documented at var_time --') constraint DS = {6} extremes [2, infinity) hits 5/60 nti 7 constraint CS = {7} extremes [2, 2] English: @@ -5477,29 +5477,29 @@ hits 199/10188 nti 7 constraint DW = {11, 12} extremes [2, infinity) English: - (hits 191/3871) (matched long text) constraint DS = {11} extremes [2, infinity) + (hits 191/3151) (matched long text) constraint DS = {11} extremes [2, infinity) - (hits 8/3730) (matched long text) constraint DS = {12} extremes [3, infinity) + (hits 8/3604) (matched long text) constraint DS = {12} extremes [3, infinity) - hits 191/2386 nti 11 constraint DS = {11} extremes [2, infinity) + hits 191/2278 nti 11 constraint DS = {11} extremes [2, infinity) English: volume {...} - (hits 6/1193) (matched long text) constraint DS = {11} extremes [2, infinity) + (hits 6/1139) (matched long text) constraint DS = {11} extremes [2, infinity) book {...} - (hits 0/1187) constraint DS = {11} extremes [2, infinity) + (hits 0/1133) constraint DS = {11} extremes [2, infinity) part {...} - (hits 14/1187) (matched: 'part two - the physical world model') constraint DS = {11} extremes [2, infinity) + (hits 14/1133) (matched: 'part two - the physical world model') constraint DS = {11} extremes [2, infinity) chapter {...} - (hits 20/1173) (matched long text) constraint DS = {11} extremes [2, infinity) + (hits 20/1119) (matched long text) constraint DS = {11} extremes [2, infinity) section {...} - (hits 151/1153) (matched long text) constraint DS = {11} extremes [2, infinity) + (hits 151/1099) (matched long text) constraint DS = {11} extremes [2, infinity) - hits 8/7460 nti 12 constraint DS = {12} extremes [3, infinity) + hits 8/7208 nti 12 constraint DS = {12} extremes [3, infinity) English: {...} begin/begins here - (hits 4/3730) (matched long text) constraint DS = {12} extremes [3, infinity) + (hits 4/3604) (matched long text) constraint DS = {12} extremes [3, infinity) {...} end/ends here - (hits 4/3726) (matched: 'the standard rules end here') constraint DS = {12} extremes [3, infinity) + (hits 4/3600) (matched: 'the standard rules end here') constraint DS = {12} extremes [3, infinity) hits 32/12958 nti 14 constraint (none) extremes [1, infinity) English: @@ -5508,41 +5508,41 @@ {...} (hits 0/6459) constraint (none) extremes [2, infinity) - (hits 0/6301) constraint DS = {13} extremes [4, infinity) + (hits 0/6296) constraint DS = {13} extremes [4, infinity) * constraint CS = {14} extremes [1, 1] * constraint DS = {14} extremes [2, 2] table {...} - (hits 14/6315) (matched long text) constraint DS = {14} extremes [2, infinity) + (hits 14/6347) (matched long text) constraint DS = {14} extremes [2, infinity) equation {...} - (hits 0/6301) constraint DS = {14} extremes [2, infinity) + (hits 0/6333) constraint DS = {14} extremes [2, infinity) include the {...} by {...} - (hits 0/6280) constraint DS = {14} extremes [5, infinity) + (hits 0/6307) constraint DS = {14} extremes [5, infinity) include {...} by {...} - (hits 18/6301) (matched long text) constraint DS = {14} extremes [4, infinity) + (hits 18/6333) (matched long text) constraint DS = {14} extremes [4, infinity) include (- {...} - (hits 0/6283) constraint DS = {14} extremes [3, infinity) + (hits 0/6315) constraint DS = {14} extremes [3, infinity) hits 9/2788 nti 15 constraint DS = {15} extremes [2, infinity) English: instead of {...} - (hits 0/1113) constraint DS = {15} extremes [3, infinity) + (hits 0/1322) constraint DS = {15} extremes [3, infinity) every turn {***} - (hits 1/1113) (matched: 'every turn rules is a rulebook') constraint DS = {15} extremes [2, infinity) + (hits 1/1322) (matched: 'every turn rules is a rulebook') constraint DS = {15} extremes [2, infinity) before {...} - (hits 2/1112) (matched long text) constraint DS = {15} extremes [2, infinity) + (hits 2/1321) (matched long text) constraint DS = {15} extremes [2, infinity) after {...} - (hits 2/1110) (matched long text) constraint DS = {15} extremes [2, infinity) + (hits 2/1319) (matched long text) constraint DS = {15} extremes [2, infinity) when {...} - (hits 4/1108) (matched: 'when scene begins is a scene based rulebook') constraint DS = {15} extremes [2, infinity) + (hits 4/1317) (matched: 'when scene begins is a scene based rulebook') constraint DS = {15} extremes [2, infinity) - hits 0/12602 nti 13 constraint DS = {13} extremes [4, infinity) + hits 0/12592 nti 13 constraint DS = {13} extremes [4, infinity) English: include (- {###} in the preform grammar - (hits 0/127) constraint DS = {13} extremes [7, 7] + (hits 0/126) constraint DS = {13} extremes [7, 7] use {...} language element/elements - (hits 0/6301) constraint DS = {13} extremes [4, infinity) + (hits 0/6296) constraint DS = {13} extremes [4, infinity) hits 30/442 nti 21 constraint DS = {21} extremes [2, infinity) English: @@ -5690,25 +5690,25 @@ hits 2873/18796 nti 31 constraint DS = {31} extremes [1, infinity) English: if {...} is begin - (hits 0/4046) constraint DS = {31} extremes [4, infinity) + (hits 0/4033) constraint DS = {31} extremes [4, infinity) if {...} is - (hits 0/4635) constraint DS = {31} extremes [3, infinity) + (hits 0/4622) constraint DS = {31} extremes [3, infinity) if/unless {...} - (hits 2123/4657) (matched long text) constraint DS = {31} extremes [2, infinity) + (hits 2123/4644) (matched long text) constraint DS = {31} extremes [2, infinity) repeat {...} - (hits 101/2534) (matched long text) constraint DS = {31} extremes [2, infinity) + (hits 101/2521) (matched long text) constraint DS = {31} extremes [2, infinity) while {...} - (hits 31/2433) (matched long text) constraint DS = {31} extremes [2, infinity) + (hits 31/2420) (matched long text) constraint DS = {31} extremes [2, infinity) else/otherwise (hits 330/345) (matched: 'otherwise') constraint CS = {31} extremes [1, 1] else/otherwise if/unless {...} - (hits 231/2380) (matched long text) constraint DS = {31} extremes [3, infinity) + (hits 231/2367) (matched long text) constraint DS = {31} extremes [3, infinity) else/otherwise {...} - (hits 57/2171) (matched long text) constraint DS = {31} extremes [2, infinity) + (hits 57/2158) (matched long text) constraint DS = {31} extremes [2, infinity) -- otherwise constraint CS = {31} extremes [2, 2] -- {...} - (hits 0/2114) constraint DS = {31} extremes [2, infinity) + (hits 0/2101) constraint DS = {31} extremes [2, infinity) hits 0/12004 nti 6 constraint CS = {6} extremes [2, 2] English: @@ -5722,9 +5722,9 @@ hits 756/14584 nti 7 constraint DS = {7} extremes [2, infinity) English: say {...} - (hits 584/3137) (matched: 'say run paragraph on with special look spacing') constraint DS = {7} extremes [2, infinity) + (hits 584/3120) (matched: 'say run paragraph on with special look spacing') constraint DS = {7} extremes [2, infinity) now {...} - (hits 172/2553) (matched long text) constraint DS = {7} extremes [2, infinity) + (hits 172/2536) (matched long text) constraint DS = {7} extremes [2, infinity) hits 2306/7528 nti 8 constraint DS = {8} extremes [3, infinity) English: @@ -5734,9 +5734,9 @@ hits 30/9858 nti 9 constraint DS = {9} extremes [2, infinity) English: instead {...} - (hits 0/1694) constraint DS = {9} extremes [2, infinity) + (hits 0/1711) constraint DS = {9} extremes [2, infinity) {...} instead - (hits 30/1694) (matched long text) constraint DS = {9} extremes [2, infinity) + (hits 30/1711) (matched long text) constraint DS = {9} extremes [2, infinity) hits 0/880 nti 10 constraint DS = {10} extremes [2, infinity) English: @@ -5882,9 +5882,9 @@ hits 104/208 nti 15 constraint (none) extremes [1, infinity) English: {...} that varies - (hits 0/19) constraint DS = {15} extremes [3, infinity) + (hits 0/14) constraint DS = {15} extremes [3, infinity) {...} variable - (hits 0/29) constraint DS = {15} extremes [2, infinity) + (hits 0/24) constraint DS = {15} extremes [2, infinity) {...} (hits 104/104) (matched: 'the removing it from action') constraint (none) extremes [1, infinity) @@ -5920,16 +5920,16 @@ hits 24/48 nti 18 constraint (none) extremes [1, infinity) English: - (hits 0/4) constraint DS = {21} extremes [3, infinity) + (hits 0/3) constraint DS = {21} extremes [3, infinity) (hits 24/24) (matched: 'variable initial value') constraint (none) extremes [1, infinity) - hits 0/16 nti 21 constraint DS = {21} extremes [2, infinity) + hits 0/12 nti 21 constraint DS = {21} extremes [2, infinity) English: , _{and} constraint DS = {21} extremes [3, infinity) _{,/and} - (hits 0/4) constraint DS = {21} extremes [2, infinity) + (hits 0/3) constraint DS = {21} extremes [2, infinity) hits 24/48 nti 20 constraint (none) extremes [1, infinity) English: @@ -5972,7 +5972,7 @@
    plural of (hits 4/270) (matched: 'the plural of person') constraint DS = {25} extremes [4, infinity) plural of - (hits 0/318) constraint DS = {25} extremes [3, infinity) + (hits 0/321) constraint DS = {25} extremes [3, infinity) nti 19 constraint (none) extremes [1, infinity) English: @@ -6157,21 +6157,21 @@ {...} (hits 30/466) (matched long text) constraint (none) extremes [1, infinity) - (hits 0/136) constraint DS = {17, 18} extremes [4, infinity) + (hits 0/138) constraint DS = {17, 18} extremes [4, infinity) - (hits 83/234) (matched long text) constraint DS = {17} extremes [2, infinity) + (hits 83/223) (matched long text) constraint DS = {17} extremes [2, infinity) - hits 30/1716 nti 18 constraint DS = {18} extremes [2, infinity) + hits 30/1746 nti 18 constraint DS = {18} extremes [2, infinity) English: , _{and} - (hits 1/448) (matched: ', and the library') constraint DS = {18} extremes [3, infinity) + (hits 1/476) (matched: ', and the library') constraint DS = {18} extremes [3, infinity) _{,/and} - (hits 29/486) (matched long text) constraint DS = {18} extremes [2, infinity) + (hits 29/520) (matched long text) constraint DS = {18} extremes [2, infinity) - hits 83/528 nti 17 constraint DS = {17} extremes [2, infinity) + hits 83/506 nti 17 constraint DS = {17} extremes [2, infinity) English: {...} rule - (hits 83/261) (matched long text) constraint DS = {17} extremes [2, infinity) + (hits 83/250) (matched long text) constraint DS = {17} extremes [2, infinity) nti 19 constraint DS = {17} extremes [2, infinity) English: @@ -6451,7 +6451,7 @@ hits 0/856 nti 22 constraint DS = {22} extremes [2, infinity) English: either - (hits 0/140) constraint DS = {22} extremes [2, infinity) + (hits 0/144) constraint DS = {22} extremes [2, infinity) hits 0/86 nti 23 constraint (none) extremes [1, 2] English: @@ -6465,11 +6465,11 @@ hits 43/86 nti 26 constraint (none) extremes [1, infinity) English: either ( ) - (hits 0/4) constraint DS = {26} extremes [5, infinity) + (hits 0/1) constraint DS = {26} extremes [5, infinity) ( ) - (hits 0/4) constraint DS = {26} extremes [4, infinity) + (hits 0/1) constraint DS = {26} extremes [4, infinity) either - (hits 0/30) constraint DS = {26} extremes [2, infinity) + (hits 0/1) constraint DS = {26} extremes [2, infinity) (hits 43/43) (matched: 'marked for listing or unmarked for listing') constraint (none) extremes [1, infinity) @@ -6499,18 +6499,18 @@ hits 74/1260 nti 12 constraint DS = {27} extremes [1, infinity) English: - (hits 74/325) (matched: 'a verb') constraint DS = {27} extremes [2, infinity) + (hits 74/379) (matched: 'a verb') constraint DS = {27} extremes [2, infinity) - (hits 0/263) constraint DS = {27} extremes [1, infinity) + (hits 0/317) constraint DS = {27} extremes [1, infinity) - hits 74/946 nti 27 constraint DS = {27} extremes [1, infinity) + hits 74/1162 nti 27 constraint DS = {27} extremes [1, infinity) English: verb (hits 74/86) (matched: 'verb') constraint CS = {27} extremes [1, 1] verb implying/meaning nounphrase-unparsed> - (hits 0/55) constraint DS = {27} extremes [4, 4] + (hits 0/72) constraint DS = {27} extremes [4, 4] verb implying/meaning - (hits 0/382) constraint DS = {27} extremes [3, infinity) + (hits 0/402) constraint DS = {27} extremes [3, infinity) hits 82/168 nti 13 constraint DS = {28} extremes [2, infinity) English: @@ -6533,7 +6533,7 @@ hits 152/304 nti 31 constraint (none) extremes [1, infinity) English: in - (hits 0/45) constraint DS = {31} extremes [3, infinity) + (hits 0/24) constraint DS = {31} extremes [3, infinity) (hits 152/152) (matched long text) constraint (none) extremes [1, infinity) @@ -6593,18 +6593,18 @@ hits 0/856 nti 15 constraint DS = {8} extremes [1, infinity) English: - (hits 0/85) constraint DS = {8} extremes [2, infinity) + (hits 0/64) constraint DS = {8} extremes [2, infinity) - (hits 0/86) constraint DS = {8} extremes [1, infinity) + (hits 0/65) constraint DS = {8} extremes [1, infinity) - hits 0/266 nti 8 constraint DS = {8} extremes [1, infinity) + hits 0/182 nti 8 constraint DS = {8} extremes [1, infinity) English: adjective (hits 0/1) constraint CS = {8} extremes [1, 1] adjective implying/meaning - (hits 0/76) constraint DS = {8} extremes [4, infinity) + (hits 0/58) constraint DS = {8} extremes [4, infinity) adjective implying/meaning - (hits 0/111) constraint DS = {8} extremes [3, infinity) + (hits 0/90) constraint DS = {8} extremes [3, infinity) nti 9 constraint (none) extremes [1, infinity) English: @@ -6618,7 +6618,7 @@ variable (hits 0/13) constraint CS = {10} extremes [1, 1] action of - (hits 0/124) constraint DS = {10} extremes [3, infinity) + (hits 0/103) constraint DS = {10} extremes [3, infinity) (hits 728/978) (matched: 'action name based rule producing nothing that varies') constraint (none) extremes [1, infinity) @@ -6627,7 +6627,7 @@ hits 0/514 nti 12 constraint DS = {11, 12} extremes [4, infinity) English: {...} ( ) - (hits 0/35) constraint DS = {11, 12} extremes [4, infinity) + (hits 0/34) constraint DS = {11, 12} extremes [4, infinity) nti 11 constraint CS = {11} extremes [1, 1] English: @@ -6647,7 +6647,7 @@ {***} (/)/(- (hits 0/111) constraint DS = {13} extremes [1, infinity) {...} (/)/(- {...} - (hits 0/80) constraint DS = {13} extremes [3, infinity) + (hits 0/81) constraint DS = {13} extremes [3, infinity) ni--crash--1 (hits 0/17) constraint CS = {13} extremes [1, 1] ni--crash--10 @@ -6659,7 +6659,7 @@ {...} , (hits 0/94) constraint DS = {13} extremes [2, infinity) {...} when/while {...} - (hits 0/80) constraint DS = {13} extremes [3, infinity) + (hits 0/81) constraint DS = {13} extremes [3, infinity) {***} {***} (hits 0/273) constraint (none) extremes [1, infinity) condition @@ -6697,14 +6697,14 @@ hits 19/2150 nti 15 constraint DS = {15} extremes [5, infinity) English: {...} ( called {...} ) {***} - (hits 19/331) (matched long text) constraint DS = {15} extremes [5, infinity) + (hits 19/328) (matched long text) constraint DS = {15} extremes [5, infinity) hits 0/1474 nti 16 constraint (none) extremes [1, infinity) English:
    (hits 0/156) constraint (none) extremes [1, 1] {***} (/)/{/}/,/./(- {***} - (hits 0/84) constraint DS = {16} extremes [1, infinity) + (hits 0/67) constraint DS = {16} extremes [1, infinity) {***} {***} (hits 0/667) constraint (none) extremes [1, infinity) @@ -6713,14 +6713,14 @@ (hits 0/661) constraint (none) extremes [1, 1] {***} (/)/{/}/,/. {***} - (hits 0/7) constraint DS = {17} extremes [1, infinity) + (hits 0/29) constraint DS = {17} extremes [1, infinity) {***} {***} (hits 0/806) constraint (none) extremes [1, infinity) hits 0/50 nti 18 constraint (none) extremes [1, infinity) English: {...} with/having/and/or {...} - (hits 0/9) constraint DS = {18} extremes [3, infinity) + (hits 0/10) constraint DS = {18} extremes [3, infinity) (hits 0/25) constraint (none) extremes [1, infinity) @@ -7016,9 +7016,9 @@ (hits 171/171) (matched: '100') constraint CS = {r0} extremes [1, 1] minus - (hits 0/2000) constraint DS = {12} extremes [2, 2] + (hits 0/1998) constraint DS = {12} extremes [2, 2] ( ) - (hits 273/844) (matched: '"[current item from the multiple object list]: [run paragraph on]" ( a )') constraint DS = {12} extremes [4, 4] + (hits 273/840) (matched: '"[current item from the multiple object list]: [run paragraph on]" ( a )') constraint DS = {12} extremes [4, 4] (hits 1564/5496) (matched: 'Represents geographical locations, both indoor and outdoor, which are not necessarily areas in a building. A player in one @@ -7027,24 +7027,24 @@ (hits 11/9823) (matched: 'plus infinity') constraint (none) extremes [1, infinity) - (hits 78/247) (matched: 'false') constraint CS = {6} extremes [1, 1] + (hits 78/298) (matched: 'false') constraint CS = {6} extremes [1, 1] - (hits 0/1692) constraint DS = {8} extremes [2, infinity) + (hits 0/1470) constraint DS = {8} extremes [2, infinity) unicode - (hits 0/4344) constraint DS = {12} extremes [2, infinity) + (hits 0/4350) constraint DS = {12} extremes [2, infinity) - (hits 0/3572) constraint DW = {9, 10, 11} extremes [2, 5] + (hits 0/2983) constraint DW = {9, 10, 11} extremes [2, 5] (hits 0/9734) constraint (none) extremes [1, infinity) internal hits 680/1360 nti 23 constraint (none) extremes [1, 1] - hits 78/494 nti 6 constraint CS = {6} extremes [1, 1] + hits 78/596 nti 6 constraint CS = {6} extremes [1, 1] English: false - (hits 29/247) (matched: 'false') constraint CS = {6} extremes [1, 1] + (hits 29/298) (matched: 'false') constraint CS = {6} extremes [1, 1] true - (hits 49/218) (matched: 'true') constraint CS = {6} extremes [1, 1] + (hits 49/269) (matched: 'true') constraint CS = {6} extremes [1, 1] internal nti 24 constraint (none) extremes [1, infinity) @@ -7065,30 +7065,30 @@ internal hits 1/19626 nti 26 constraint (none) extremes [1, infinity) - hits 0/7144 nti 11 constraint DW = {9, 10, 11} extremes [2, 5] + hits 0/5966 nti 11 constraint DW = {9, 10, 11} extremes [2, 5] English: minus - (hits 0/876) constraint DS = {9, 11} extremes [3, 5] + (hits 0/836) constraint DS = {9, 11} extremes [3, 5] - (hits 0/1144) constraint DS = {9} extremes [2, 4] + (hits 0/1852) constraint DS = {9} extremes [2, 4] - (hits 0/231) constraint DS = {10} extremes [2, 2] + (hits 0/238) constraint DS = {10} extremes [2, 2] - hits 0/2288 nti 9 constraint DS = {9} extremes [2, 4] + hits 0/3704 nti 9 constraint DS = {9} extremes [2, 4] English: hour/hours - (hits 0/399) constraint DS = {9} extremes [2, 2] + (hits 0/847) constraint DS = {9} extremes [2, 2] minute/minutes - (hits 0/399) constraint DS = {9} extremes [2, 2] + (hits 0/847) constraint DS = {9} extremes [2, 2] hour/hours minute/minutes - (hits 0/400) constraint DS = {9} extremes [4, 4] + (hits 0/398) constraint DS = {9} extremes [4, 4] - hits 0/462 nti 27 constraint DS = {10} extremes [2, 2] + hits 0/476 nti 27 constraint DS = {10} extremes [2, 2] English: - (hits 0/231) constraint DS = {10} extremes [2, 2] + (hits 0/238) constraint DS = {10} extremes [2, 2] - (hits 0/231) constraint DS = {10} extremes [2, 2] + (hits 0/238) constraint DS = {10} extremes [2, 2] nti 10 constraint CS = {10} extremes [1, 1] English: @@ -7097,20 +7097,20 @@ pm constraint CS = {10} extremes [1, 1] - internal hits 0/462 nti 28 constraint (none) extremes [1, 1] + internal hits 0/476 nti 28 constraint (none) extremes [1, 1] internal nti 29 constraint (none) extremes [1, 1] - hits 0/3164 nti 19 constraint DS = {19} extremes [2, infinity) + hits 0/3144 nti 19 constraint DS = {19} extremes [2, infinity) English: at (hits 0/10) constraint DS = {10, 19} extremes [3, 3] at the time when {...} - (hits 0/1548) constraint DS = {19} extremes [5, infinity) + (hits 0/1542) constraint DS = {19} extremes [5, infinity) at the time that {...} - (hits 0/1548) constraint DS = {19} extremes [5, infinity) + (hits 0/1542) constraint DS = {19} extremes [5, infinity) at {...} - (hits 0/1582) constraint DS = {19} extremes [2, infinity) + (hits 0/1572) constraint DS = {19} extremes [2, infinity) nti 30 constraint (none) extremes [1, infinity) English: @@ -7121,12 +7121,12 @@ internal nti 31 constraint (none) extremes [1, infinity) - hits 0/3384 nti 8 constraint DS = {8} extremes [2, infinity) + hits 0/2940 nti 8 constraint DS = {8} extremes [2, infinity) English: { } - constraint CS = {8} extremes [2, 2] + (hits 0/22) constraint CS = {8} extremes [2, 2] { } - (hits 0/1420) constraint DS = {8} extremes [3, infinity) + (hits 0/1334) constraint DS = {8} extremes [3, infinity) nti 7 constraint (none) extremes [1, infinity) English: @@ -7174,17 +7174,17 @@ (hits 1797/10396) (matched: '"[current item from the multiple object list]: [run paragraph on]" ( a )') constraint (none) extremes [1, infinity) nothing - (hits 97/122) (matched: 'nothing') constraint CS = {20} extremes [1, 1] + (hits 97/111) (matched: 'nothing') constraint CS = {20} extremes [1, 1] (hits 446/8502) (matched: 'printing the name of a dark room') constraint (none) extremes [1, infinity) outcome - (hits 0/2785) constraint DS = {20} extremes [2, infinity) + (hits 0/1301) constraint DS = {20} extremes [2, infinity) option - (hits 26/2785) (matched: 'serial comma option') constraint DS = {20} extremes [2, infinity) + (hits 26/1301) (matched: 'serial comma option') constraint DS = {20} extremes [2, infinity) verb - (hits 1/2759) (matched: 'verb are') constraint DS = {20} extremes [2, infinity) + (hits 1/1275) (matched: 'verb are') constraint DS = {20} extremes [2, infinity) response ( ) - (hits 0/742) constraint DS = {20} extremes [5, infinity) + (hits 0/611) constraint DS = {20} extremes [5, infinity) internal hits 446/17004 nti 18 constraint (none) extremes [1, infinity) @@ -7201,9 +7201,9 @@ hits 34/1592 nti 24 constraint DS = {20} extremes [2, infinity) English: - (hits 34/181) (matched: 'the property initial appearance') constraint DS = {20} extremes [3, infinity) + (hits 34/135) (matched: 'the property initial appearance') constraint DS = {20} extremes [3, infinity) - (hits 0/168) constraint DS = {20} extremes [2, infinity) + (hits 0/101) constraint DS = {20} extremes [2, infinity) internal hits 796/21352 nti 25 constraint (none) extremes [1, infinity) @@ -7215,7 +7215,7 @@ hits 1442/27388 nti 22 constraint (none) extremes [1, infinity) English: not - (hits 0/2557) constraint DS = {22} extremes [3, infinity) + (hits 0/2723) constraint DS = {22} extremes [3, infinity) (hits 0/6875) constraint (none) extremes [2, infinity) @@ -7224,11 +7224,11 @@ hits 1513/29618 nti 21 constraint (none) extremes [1, infinity) English: not - (hits 12/4944) (matched: 'not lockable') constraint DS = {21} extremes [2, infinity) + (hits 12/3319) (matched: 'not lockable') constraint DS = {21} extremes [2, infinity) (hits 1430/2225) (matched: 'unmarked for listing') constraint CS = {r3} extremes [1, infinity) not - (hits 0/3083) constraint DS = {21} extremes [3, infinity) + (hits 0/2504) constraint DS = {21} extremes [3, infinity) (hits 71/7202) (matched: 'marked for listing other') constraint (none) extremes [2, infinity) @@ -7382,9 +7382,9 @@ hits 3118/7704 nti 31 constraint (none) extremes [1, infinity) English: variable/variables - (hits 2/470) (matched: 'text variables') constraint DS = {31} extremes [2, infinity) + (hits 2/438) (matched: 'text variables') constraint DS = {31} extremes [2, infinity) that/which vary/varies - (hits 59/388) (matched: 'action name based rule producing nothing that varies') constraint DS = {31} extremes [3, infinity) + (hits 59/364) (matched: 'action name based rule producing nothing that varies') constraint DS = {31} extremes [3, infinity) (hits 2436/3791) (matched long text) constraint (none) extremes [1, infinity) @@ -7420,7 +7420,7 @@ global constraint CS = {30} extremes [1, 1] global - (hits 0/1) constraint DS = {30} extremes [2, infinity) + constraint DS = {30} extremes [2, infinity) (hits 61/62) (matched: 'action name based rule producing nothing') constraint (none) extremes [1, infinity) @@ -7448,7 +7448,7 @@ hits 8448/18780 nti 27 constraint (none) extremes [1, infinity) English: ( ) - (hits 0/1781) constraint DS = {27} extremes [3, infinity) + (hits 0/1800) constraint DS = {27} extremes [3, infinity) (hits 144/9390) (matched: 'the person reaching') constraint (none) extremes [1, infinity) @@ -7470,17 +7470,17 @@ (hits 116/9145) (matched: 'a supporter ( called the chaise )') constraint (none) extremes [1, infinity) - (hits 0/1457) constraint DS = {26} extremes [2, infinity) + (hits 0/1515) constraint DS = {26} extremes [2, infinity) member/members of - (hits 0/1755) constraint DS = {27} extremes [3, infinity) + (hits 0/1772) constraint DS = {27} extremes [3, infinity) member/members of - (hits 0/1755) constraint DS = {27} extremes [3, infinity) + (hits 0/1772) constraint DS = {27} extremes [3, infinity) of - (hits 2/1755) (matched: 'the destination of the player') constraint DS = {27} extremes [3, infinity) + (hits 2/1772) (matched: 'the destination of the player') constraint DS = {27} extremes [3, infinity) (hits 0/4670) constraint (none) extremes [2, infinity) entry of/in/from - (hits 0/1219) constraint DS = {27} extremes [4, infinity) + (hits 0/1228) constraint DS = {27} extremes [4, infinity) (hits 0/9027) constraint (none) extremes [1, infinity) @@ -7491,9 +7491,9 @@ hits 4/18384 nti 25 constraint (none) extremes [1, infinity) English: where - (hits 4/1962) (matched long text) constraint DS = {25} extremes [3, infinity) + (hits 4/1969) (matched long text) constraint DS = {25} extremes [3, infinity) where - (hits 0/1958) constraint DS = {25} extremes [3, infinity) + (hits 0/1965) constraint DS = {25} extremes [3, infinity) (hits 0/9188) constraint (none) extremes [1, infinity) @@ -7531,31 +7531,31 @@ hits 105/18348 nti 7 constraint DS = {7} extremes [3, infinity) English: of {...} - (hits 105/1399) (matched long text) constraint DS = {7} extremes [3, infinity) + (hits 105/1355) (matched long text) constraint DS = {7} extremes [3, infinity) internal hits 490/18348 nti 6 constraint (none) extremes [1, infinity) internal hits 474/18054 nti 7 constraint (none) extremes [1, infinity) - hits 139/2914 nti 26 constraint DS = {26} extremes [2, infinity) + hits 139/3030 nti 26 constraint DS = {26} extremes [2, infinity) English: entry - (hits 135/1457) (matched: 'a final response rule entry') constraint DS = {26} extremes [2, infinity) + (hits 135/1515) (matched: 'a final response rule entry') constraint DS = {26} extremes [2, infinity) in row of - (hits 0/369) constraint DS = {26} extremes [6, infinity) + (hits 0/371) constraint DS = {26} extremes [6, infinity) listed in - (hits 2/1091) (matched: 'a topic listed in source') constraint DS = {26} extremes [4, infinity) + (hits 2/1127) (matched: 'a topic listed in source') constraint DS = {26} extremes [4, infinity) corresponding to of in (hits 0/187) constraint DS = {26} extremes [8, infinity) of in - (hits 2/579) (matched long text) constraint DS = {26} extremes [5, infinity) + (hits 2/594) (matched long text) constraint DS = {26} extremes [5, infinity) internal hits 3/19876 nti 8 constraint (none) extremes [1, infinity) hits 1074/2238 nti 9 constraint (none) extremes [3, infinity) English: - (hits 0/739) constraint DS = {19} extremes [3, infinity) + (hits 0/744) constraint DS = {19} extremes [3, infinity) (hits 1074/1108) (matched long text) constraint (none) extremes [3, infinity) @@ -7567,11 +7567,11 @@ hits 2149/6658 nti 11 constraint (none) extremes [2, infinity) English: - (hits 0/953) constraint DS = {29} & FS = {9} extremes [4, infinity) + (hits 0/765) constraint DS = {29} & FS = {9} extremes [4, infinity) - (hits 224/1828) (matched long text) constraint DS = {14} & FS = {6} extremes [3, infinity) + (hits 224/1824) (matched long text) constraint DS = {14} & FS = {6} extremes [3, infinity) - (hits 1925/2174) (matched long text) constraint FS = {6} extremes [2, infinity) + (hits 1925/2170) (matched long text) constraint FS = {6} extremes [2, infinity) nti 29 constraint DS = {29} extremes [3, infinity) English: @@ -7581,25 +7581,25 @@ hits 260/9966 nti 12 constraint (none) extremes [3, infinity) English: - (hits 169/4160) (matched long text) constraint DS = {13} extremes [3, infinity) + (hits 169/4215) (matched long text) constraint DS = {13} extremes [3, infinity) - (hits 91/2723) (matched long text) constraint DS = {30} extremes [4, infinity) + (hits 91/2729) (matched long text) constraint DS = {30} extremes [4, infinity) - hits 448/30222 nti 28 constraint DS = {13} extremes [2, infinity) + hits 448/30444 nti 28 constraint DS = {13} extremes [2, infinity) English: - (hits 447/8748) (matched long text) constraint DS = {13} extremes [2, infinity) + (hits 447/8847) (matched long text) constraint DS = {13} extremes [2, infinity) not - (hits 1/5364) (matched: 'not carried by the person asked') constraint DS = {13, 28} extremes [3, infinity) + (hits 1/5294) (matched: 'not carried by the person asked') constraint DS = {13, 28} extremes [3, infinity) - hits 183/23360 nti 13 constraint DS = {30} extremes [3, infinity) + hits 183/23404 nti 13 constraint DS = {30} extremes [3, infinity) English: - (hits 0/2516) constraint DS = {29, 30} extremes [5, infinity) + (hits 0/2198) constraint DS = {29, 30} extremes [5, infinity) - (hits 32/3648) (matched long text) constraint DS = {14, 30} extremes [4, infinity) + (hits 32/3634) (matched long text) constraint DS = {14, 30} extremes [4, infinity) - (hits 151/5619) (matched: 'which provide the property initial appearance') constraint DS = {30} extremes [3, infinity) + (hits 151/5604) (matched: 'which provide the property initial appearance') constraint DS = {30} extremes [3, infinity) internal hits 791/18290 nti 14 constraint (none) extremes [1, infinity) @@ -7626,7 +7626,7 @@ hits 2/496 nti 8 constraint (none) extremes [1, infinity) English: ( ) - (hits 0/14) constraint DS = {8} extremes [3, infinity) + (hits 0/18) constraint DS = {8} extremes [3, infinity) constraint CS = {r0} extremes [1, 1] @@ -7644,15 +7644,15 @@ hits 1325/3170 nti 17 constraint (none) extremes [0, infinity) English: ( ) - (hits 0/1297) constraint DS = {17} extremes [3, infinity) + (hits 0/1286) constraint DS = {17} extremes [3, infinity) , and - (hits 0/1185) constraint DS = {17} extremes [4, infinity) + (hits 0/1172) constraint DS = {17} extremes [4, infinity) and - (hits 97/1297) (matched long text) constraint DS = {17} extremes [3, infinity) + (hits 97/1286) (matched long text) constraint DS = {17} extremes [3, infinity) , or - (hits 0/1088) constraint DS = {17} extremes [4, infinity) + (hits 0/1075) constraint DS = {17} extremes [4, infinity) or - (hits 31/1200) (matched long text) constraint DS = {17} extremes [3, infinity) + (hits 31/1189) (matched long text) constraint DS = {17} extremes [3, infinity) (hits 0/1457) constraint (none) extremes [1, infinity) @@ -7665,11 +7665,11 @@ (hits 1/1457) (matched: 'continuing') constraint (none) extremes [1, infinity) not - (hits 0/679) constraint DS = {16} extremes [2, infinity) + (hits 0/339) constraint DS = {16} extremes [2, infinity) (hits 83/1456) (matched long text) constraint (none) extremes [1, infinity) - (hits 0/1095) constraint DS = {11} extremes [3, infinity) + (hits 0/1103) constraint DS = {11} extremes [3, infinity) (hits 0/945) constraint DS = {12} extremes [4, infinity) @@ -7684,7 +7684,7 @@ hits 83/2912 nti 10 constraint (none) extremes [1, infinity) English: - (hits 0/764) constraint DS = {9, 19} extremes [3, infinity) + (hits 0/768) constraint DS = {9, 19} extremes [3, infinity) (hits 83/1445) (matched long text) constraint (none) extremes [1, infinity) not @@ -7699,10 +7699,10 @@ not constraint DS = {15} extremes [2, infinity) - hits 22/2092 nti 9 constraint DS = {9, 19} extremes [3, infinity) + hits 22/2100 nti 9 constraint DS = {9, 19} extremes [3, infinity) English: is/are {...} - (hits 22/792) (matched long text) constraint DS = {9, 19} extremes [3, infinity) + (hits 22/796) (matched long text) constraint DS = {9, 19} extremes [3, infinity) internal hits 94/2912 nti 20 constraint (none) extremes [1, infinity) @@ -7718,10 +7718,10 @@ (hits 0/1104) constraint DS = {14} extremes [2, infinity) - hits 0/2190 nti 24 constraint DS = {11} extremes [3, infinity) + hits 0/2206 nti 24 constraint DS = {11} extremes [3, infinity) English: - (hits 0/1095) constraint DS = {11} extremes [3, infinity) + (hits 0/1103) constraint DS = {11} extremes [3, infinity) hits 0/1890 nti 25 constraint DS = {12} extremes [4, infinity) English: @@ -7731,14 +7731,14 @@ hits 1374/2748 nti 18 constraint (none) extremes [1, infinity) English: ( ) - (hits 0/656) constraint DS = {18} extremes [3, infinity) + (hits 0/667) constraint DS = {18} extremes [3, infinity) (hits 1374/1374) (matched long text) constraint (none) extremes [1, infinity) hits 2627/5254 nti 20 constraint (none) extremes [1, infinity) English: ( ) - (hits 0/503) constraint DS = {20} extremes [3, infinity) + (hits 0/346) constraint DS = {20} extremes [3, infinity) (hits 239/2627) (matched: 'might not appreciate') constraint (none) extremes [1, infinity) @@ -7749,9 +7749,9 @@ (hits 0/2581) constraint (none) extremes [1, infinity) verb - (hits 0/747) constraint DS = {19} extremes [2, infinity) + (hits 0/755) constraint DS = {19} extremes [2, infinity) adjective - (hits 0/747) constraint DS = {19} extremes [2, infinity) + (hits 0/755) constraint DS = {19} extremes [2, infinity) (hits 210/2581) (matched: 'do not fit') constraint (none) extremes [1, infinity) verb @@ -7800,10 +7800,10 @@ variable initial value (hits 1/1) (matched: 'variable initial value') constraint CS = {21} extremes [3, 3] - hits 34/496 nti 20 constraint DS = {20} extremes [2, infinity) + hits 34/270 nti 20 constraint DS = {20} extremes [2, infinity) English: property {...} - (hits 34/202) (matched: 'property initial appearance') constraint DS = {20} extremes [2, infinity) + (hits 34/135) (matched: 'property initial appearance') constraint DS = {20} extremes [2, infinity) internal hits 69/430 nti 8 constraint (none) extremes [1, infinity) @@ -7816,7 +7816,7 @@ hits 0/292 nti 22 constraint DS = {22} extremes [1, infinity) English: {***} of {***} - (hits 0/1) constraint DS = {22} extremes [1, infinity) + (hits 0/2) constraint DS = {22} extremes [1, infinity) internal nti 12 constraint (none) extremes [1, infinity) @@ -7889,13 +7889,13 @@ (hits 0/418) constraint (none) extremes [2, infinity) rules/rulebook - (hits 24/222) (matched: 'does the player mean rules') constraint DS = {28} extremes [2, infinity) + (hits 24/209) (matched: 'does the player mean rules') constraint DS = {28} extremes [2, infinity) at {***} - (hits 0/198) constraint DS = {28} extremes [1, infinity) + (hits 0/185) constraint DS = {28} extremes [1, infinity) to {***} - (hits 0/198) constraint DS = {28} extremes [1, infinity) + (hits 0/185) constraint DS = {28} extremes [1, infinity) definition {***} - (hits 0/198) constraint DS = {28} extremes [1, infinity) + (hits 0/185) constraint DS = {28} extremes [1, infinity) {...} (hits 407/407) (matched long text) constraint (none) extremes [1, infinity) @@ -7927,26 +7927,26 @@ hits 395/790 nti 31 constraint (none) extremes [1, infinity) English: rule for/about/on - (hits 13/196) (matched long text) constraint DS = {31} extremes [3, infinity) + (hits 13/153) (matched long text) constraint DS = {31} extremes [3, infinity) rule - (hits 0/188) constraint DS = {31} extremes [2, infinity) + (hits 0/145) constraint DS = {31} extremes [2, infinity) first rule - (hits 0/183) constraint DS = {31} extremes [3, infinity) + (hits 0/140) constraint DS = {31} extremes [3, infinity) first - (hits 3/188) (matched: 'first turn sequence rule') constraint DS = {31} extremes [2, infinity) + (hits 3/145) (matched: 'first turn sequence rule') constraint DS = {31} extremes [2, infinity) last rule - (hits 0/180) constraint DS = {31} extremes [3, infinity) + (hits 0/137) constraint DS = {31} extremes [3, infinity) last - (hits 3/185) (matched: 'last turn sequence rule') constraint DS = {31} extremes [2, infinity) + (hits 3/142) (matched: 'last turn sequence rule') constraint DS = {31} extremes [2, infinity) (hits 376/376) (matched long text) constraint (none) extremes [1, infinity) hits 395/790 nti 30 constraint (none) extremes [1, infinity) English: {when ... begins} - (hits 4/106) (matched long text) constraint DS = {30} extremes [3, infinity) + (hits 4/109) (matched long text) constraint DS = {30} extremes [3, infinity) {when ... ends} - (hits 0/102) constraint DS = {30} extremes [3, infinity) + (hits 0/105) constraint DS = {30} extremes [3, infinity) {...} (hits 391/391) (matched long text) constraint (none) extremes [1, infinity) @@ -8045,9 +8045,9 @@ hits 35/70 nti 11 constraint (none) extremes [1, infinity) English: {...} of/for something/anything - (hits 14/30) (matched: 'printing the plural name of something') constraint DS = {11} extremes [3, infinity) + (hits 14/26) (matched: 'printing the plural name of something') constraint DS = {11} extremes [3, infinity) {...} something/anything - (hits 5/16) (matched: 'printing a locale paragraph about something') constraint DS = {11} extremes [2, infinity) + (hits 5/12) (matched: 'printing a locale paragraph about something') constraint DS = {11} extremes [2, infinity) {...} (hits 16/16) (matched: 'printing a refusal to act in the dark') constraint (none) extremes [1, infinity) @@ -8066,7 +8066,7 @@ hits 41/82 nti 19 constraint (none) extremes [1, infinity) English: not - (hits 1/23) (matched: 'not opening or closing or locking or unlocking') constraint DS = {19} extremes [2, infinity) + (hits 1/22) (matched: 'not opening or closing or locking or unlocking') constraint DS = {19} extremes [2, infinity) (hits 40/40) (matched: 'dropping or throwing or inserting or putting') constraint (none) extremes [1, infinity) @@ -8128,34 +8128,34 @@ hits 432/1426 nti 21 constraint DS = {21} extremes [2, infinity) English: (- {###} - in to only - (hits 16/26) (matched: '(- rtrue; - in to only') constraint DS = {21} extremes [6, 6] + (hits 16/20) (matched: '(- rtrue; - in to only') constraint DS = {21} extremes [6, 6] (- {###} - in to decide if only - (hits 4/12) (matched: '(- rtrue; - in to decide if only') constraint DS = {21} extremes [8, 8] + (hits 4/10) (matched: '(- rtrue; - in to decide if only') constraint DS = {21} extremes [8, 8] (- {###} - in to decide only - (hits 0/6) constraint DS = {21} extremes [7, 7] + (hits 0/4) constraint DS = {21} extremes [7, 7] (- {###} (hits 412/412) (matched: '(- {-say:val:K} ') constraint DS = {21} extremes [2, 2] (- {###} {...} - (hits 0/63) constraint DS = {21} extremes [3, infinity) + (hits 0/41) constraint DS = {21} extremes [3, infinity) hits 1880/3760 nti 22 constraint (none) extremes [1, infinity) English: definition (hits 88/88) (matched: 'definition') constraint CS = {22} extremes [1, 1] this is the {... rule} - (hits 58/1608) (matched long text) constraint DS = {22} extremes [5, infinity) + (hits 58/1610) (matched long text) constraint DS = {22} extremes [5, infinity) this is the rule constraint CS = {22} extremes [4, 4] this is {...} rule - (hits 0/1564) constraint DS = {22} extremes [4, infinity) + (hits 0/1566) constraint DS = {22} extremes [4, infinity) this is {...} rules - (hits 0/1564) constraint DS = {22} extremes [4, infinity) + (hits 0/1566) constraint DS = {22} extremes [4, infinity) - (hits 0/1582) constraint DS = {19} extremes [2, infinity) + (hits 0/1572) constraint DS = {19} extremes [2, infinity) to constraint CS = {22} extremes [1, 1] to {...} ( called {...} ) - (hits 0/1530) constraint DS = {22} extremes [6, infinity) + (hits 0/1532) constraint DS = {22} extremes [6, infinity) {to ...} ( this is the {### function} inverse to {###} ) (hits 32/1346) (matched long text) constraint DS = {22} extremes [12, infinity) {to ...} ( this is the {### function} ) @@ -8163,7 +8163,7 @@ {to ...} ( this is {...} ) (hits 0/1472) constraint DS = {22} extremes [7, infinity) to {...} - (hits 952/1604) (matched long text) constraint DS = {22} extremes [2, infinity) + (hits 952/1606) (matched long text) constraint DS = {22} extremes [2, infinity) {...} ( this is the {... rule} ) (hits 562/604) (matched long text) constraint DS = {22} extremes [8, infinity) {...} ( this is the rule ) @@ -8188,14 +8188,14 @@ hits 371/742 nti 27 constraint (none) extremes [1, infinity) English: during - (hits 0/173) constraint DS = {27} extremes [3, infinity) + (hits 0/293) constraint DS = {27} extremes [3, infinity) (hits 371/371) (matched long text) constraint (none) extremes [1, infinity) hits 371/742 nti 26 constraint (none) extremes [1, infinity) English: {} {when/while ...} - (hits 23/92) (matched long text) constraint DS = {26} extremes [3, infinity) + (hits 23/152) (matched long text) constraint DS = {26} extremes [3, infinity) {} (hits 348/348) (matched long text) constraint (none) extremes [1, infinity) {...} @@ -8217,9 +8217,9 @@ hits 92/1496 nti 28 constraint DS = {28} extremes [1, infinity) English: of/for {...} - (hits 48/592) (matched long text) constraint DS = {28} extremes [2, infinity) + (hits 48/212) (matched long text) constraint DS = {28} extremes [2, infinity) rule about/for/on {...} - (hits 0/534) constraint DS = {28} extremes [3, infinity) + (hits 0/164) constraint DS = {28} extremes [3, infinity) rule (hits 44/44) (matched: 'rule') constraint CS = {28} extremes [1, 1] @@ -8291,7 +8291,7 @@ hits 517/1034 nti 12 constraint (none) extremes [1, infinity) English: ( deprecated ) - (hits 1/435) (matched long text) constraint DS = {12} extremes [4, infinity) + (hits 1/436) (matched long text) constraint DS = {12} extremes [4, infinity) (hits 138/488) (matched long text) constraint DS = {10} extremes [2, infinity) @@ -8302,21 +8302,21 @@ ( arithmetic operation ) (hits 16/344) (matched long text) constraint DS = {11} extremes [6, infinity) ( assignment operation ) - (hits 6/338) (matched long text) constraint DS = {11} extremes [5, infinity) + (hits 6/337) (matched long text) constraint DS = {11} extremes [5, infinity) {let ... be given by ...} (hits 2/322) (matched long text) constraint DS = {11} extremes [6, infinity) {let ...} - (hits 4/349) (matched long text) constraint DS = {11} extremes [2, infinity) + (hits 4/344) (matched long text) constraint DS = {11} extremes [2, infinity) {...} -- end - (hits 0/343) constraint DS = {11} extremes [3, infinity) + (hits 0/338) constraint DS = {11} extremes [3, infinity) {...} -- end conditional - (hits 3/337) (matched long text) constraint DS = {11} extremes [4, infinity) + (hits 3/334) (matched long text) constraint DS = {11} extremes [4, infinity) {...} -- end loop - (hits 9/334) (matched long text) constraint DS = {11} extremes [4, infinity) + (hits 9/331) (matched long text) constraint DS = {11} extremes [4, infinity) {...} -- in loop - (hits 2/325) (matched: 'break -- in loop') constraint DS = {11} extremes [4, infinity) + (hits 2/322) (matched: 'break -- in loop') constraint DS = {11} extremes [4, infinity) {...} -- in {###} - (hits 0/323) constraint DS = {11} extremes [4, infinity) + (hits 0/320) constraint DS = {11} extremes [4, infinity) {...} (hits 358/358) (matched long text) constraint (none) extremes [1, infinity) @@ -8328,13 +8328,13 @@ hits 154/1008 nti 10 constraint DS = {10} extremes [2, infinity) English: -- running on - (hits 16/445) (matched long text) constraint DS = {10} extremes [4, infinity) + (hits 16/446) (matched long text) constraint DS = {10} extremes [4, infinity) {say otherwise/else} (hits 2/4) (matched: 'say otherwise') constraint CS = {10} extremes [2, 2] {say otherwise/else if/unless ...} - (hits 0/429) constraint DS = {10} extremes [4, infinity) + (hits 0/430) constraint DS = {10} extremes [4, infinity) {say if/unless ...} - (hits 2/444) (matched: 'say if ( c - condition )') constraint DS = {10} extremes [3, infinity) + (hits 2/445) (matched: 'say if ( c - condition )') constraint DS = {10} extremes [3, infinity) {say end if/unless} (hits 2/2) (matched: 'say end if') constraint CS = {10} extremes [3, 3] {say ...} -- beginning {###} @@ -8375,13 +8375,13 @@ hits 2231/4462 nti 16 constraint (none) extremes [1, infinity) English: ( ) {***} - (hits 0/1676) constraint DS = {16} extremes [2, infinity) + (hits 0/1665) constraint DS = {16} extremes [2, infinity) ( ) {***} - (hits 579/1656) (matched long text) constraint DS = {16} extremes [3, infinity) + (hits 579/1648) (matched long text) constraint DS = {16} extremes [3, infinity) ( {***} - (hits 0/1110) constraint DS = {16} extremes [1, infinity) + (hits 0/1094) constraint DS = {16} extremes [1, infinity) ) {***} - (hits 0/1110) constraint DS = {16} extremes [1, infinity) + (hits 0/1094) constraint DS = {16} extremes [1, infinity) {###} {***} (hits 1652/1652) (matched long text) constraint (none) extremes [1, infinity) @@ -8588,7 +8588,7 @@ hits 1/80 nti 29 constraint DS = {29} extremes [8, infinity) English: i6 condition says so ( {...} ) - (hits 1/24) (matched long text) constraint DS = {29} extremes [8, infinity) + (hits 1/23) (matched long text) constraint DS = {29} extremes [8, infinity) nti 31 constraint DW = {30, 31} extremes [2, infinity) English: @@ -8675,19 +8675,19 @@ hits 7/186 nti 9 constraint CS = {9} extremes [2, 3] English: story title - (hits 1/7) (matched: 'story title') constraint CS = {9} extremes [2, 2] + (hits 1/9) (matched: 'story title') constraint CS = {9} extremes [2, 2] story author - (hits 1/6) (matched: 'story author') constraint CS = {9} extremes [2, 2] + (hits 1/8) (matched: 'story author') constraint CS = {9} extremes [2, 2] story headline - (hits 1/5) (matched: 'story headline') constraint CS = {9} extremes [2, 2] + (hits 1/7) (matched: 'story headline') constraint CS = {9} extremes [2, 2] story genre - (hits 1/4) (matched: 'story genre') constraint CS = {9} extremes [2, 2] + (hits 1/6) (matched: 'story genre') constraint CS = {9} extremes [2, 2] story description - (hits 1/3) (matched: 'story description') constraint CS = {9} extremes [2, 2] + (hits 1/5) (matched: 'story description') constraint CS = {9} extremes [2, 2] story creation year (hits 1/1) (matched: 'story creation year') constraint CS = {9} extremes [3, 3] release number - (hits 1/2) (matched: 'release number') constraint CS = {9} extremes [2, 2] + (hits 1/4) (matched: 'release number') constraint CS = {9} extremes [2, 2] nti 12 constraint DW = {10, 11, 12} extremes [1, infinity) English: @@ -8768,7 +8768,7 @@ initial appearance (hits 1/3) (matched: 'initial appearance') constraint CS = {14} extremes [2, 2] wearable - (hits 1/5) (matched: 'wearable') constraint CS = {14} extremes [1, 1] + (hits 1/4) (matched: 'wearable') constraint CS = {14} extremes [1, 1] fixed in place (hits 1/1) (matched: 'fixed in place') constraint CS = {14} extremes [3, 3] matching key @@ -8777,33 +8777,33 @@ hits 336/61212 nti 15 constraint DS = {15} extremes [1, infinity) English: _something/anything {***} - (hits 255/7153) (matched long text) constraint DS = {15} extremes [1, infinity) + (hits 255/7395) (matched long text) constraint DS = {15} extremes [1, infinity) _somewhere/anywhere {***} - (hits 0/6898) constraint DS = {15} extremes [1, infinity) + (hits 0/7140) constraint DS = {15} extremes [1, infinity) _someone/anyone/somebody/anybody {***} - (hits 57/6898) (matched: 'someone') constraint DS = {15} extremes [1, infinity) + (hits 57/7140) (matched: 'someone') constraint DS = {15} extremes [1, infinity) _everything {***} - (hits 0/6841) constraint DS = {15} extremes [1, infinity) + (hits 0/7083) constraint DS = {15} extremes [1, infinity) _everywhere {***} - (hits 0/6841) constraint DS = {15} extremes [1, infinity) + (hits 0/7083) constraint DS = {15} extremes [1, infinity) _everyone/everybody {***} - (hits 0/6841) constraint DS = {15} extremes [1, infinity) + (hits 0/7083) constraint DS = {15} extremes [1, infinity) _nowhere {***} - (hits 24/6841) (matched: 'nowhere') constraint DS = {15} extremes [1, infinity) + (hits 24/7083) (matched: 'nowhere') constraint DS = {15} extremes [1, infinity) _nobody/no-one {***} - (hits 0/6817) constraint DS = {15} extremes [1, infinity) + (hits 0/7059) constraint DS = {15} extremes [1, infinity) _no _one {***} - (hits 0/6562) constraint DS = {15} extremes [2, infinity) + (hits 0/6808) constraint DS = {15} extremes [2, infinity) hits 0/2166 nti 16 constraint CS = {16} extremes [1, 1] English: nowhere - (hits 0/17) constraint CS = {16} extremes [1, 1] + constraint CS = {16} extremes [1, 1] hits 2/186 nti 17 constraint CS = {17} extremes [1, 3] English: player - (hits 1/2) (matched: 'player') constraint CS = {17} extremes [1, 1] + (hits 1/1) (matched: 'player') constraint CS = {17} extremes [1, 1] time of day (hits 1/1) (matched: 'time of day') constraint CS = {17} extremes [3, 3] @@ -8902,438 +8902,328 @@ outside (hits 1/1) (matched: 'outside') constraint CS = {6} extremes [1, 1] - nti 7 constraint (none) extremes [1, 1] - English: - in - constraint CS = {7} extremes [1, 1] - of - constraint CS = {7} extremes [1, 1] -
    - constraint (none) extremes [1, 1] - - nti 13 constraint (none) extremes [1, infinity) - English: - - constraint (none) extremes [1, infinity) - - nti 12 constraint (none) extremes [1, infinity) - English: - eps file - constraint CS = {12} extremes [2, 2] - mapped as - constraint DS = {12} extremes [4, infinity) - {...} mapped as {...} - constraint DS = {12} extremes [4, infinity) - mapped - constraint DS = {8, 12} extremes [4, infinity) - {...} mapped {...} - constraint DS = {12} extremes [3, infinity) - set to - constraint DS = {12} extremes [4, infinity) - set to {...} - constraint DS = {12} extremes [4, infinity) - {...} set to {...} - constraint DS = {12} extremes [4, infinity) - rubric {} {***} - constraint DS = {12} extremes [2, infinity) - {...} - constraint (none) extremes [1, infinity) - - nti 8 constraint DS = {8} extremes [2, infinity) - English: - of/from - constraint DS = {8} extremes [3, infinity) - above - constraint DS = {8} extremes [2, infinity) - below - constraint DS = {8} extremes [2, infinity) - - nti 10 constraint (none) extremes [1, infinity) - English: - of - constraint DS = {10} extremes [3, infinity) - - constraint (none) extremes [1, infinity) - {...} of - constraint DS = {10} extremes [3, infinity) - - nti 14 constraint (none) extremes [1, infinity) - English: - - constraint (none) extremes [2, infinity) - - constraint (none) extremes [1, infinity) - - nti 9 constraint (none) extremes [1, infinity) - English: - first room - constraint CS = {9} extremes [2, 2] - level - constraint DS = {9} extremes [2, 2] - - constraint (none) extremes [1, infinity) - - constraint (none) extremes [1, infinity) - - internal nti 15 constraint (none) extremes [1, infinity) - - nti 16 constraint (none) extremes [1, 1] - English: - - constraint CS = {r0} extremes [1, 1] - - constraint (none) extremes [1, 1] - - constraint CS = {11} extremes [1, 1] - - constraint (none) extremes [1, 1] - {###} - constraint (none) extremes [1, 1] - - nti 11 constraint CS = {11} extremes [1, 1] - English: - on - constraint CS = {11} extremes [1, 1] - off - constraint CS = {11} extremes [1, 1] - - internal nti 17 constraint (none) extremes [1, 1] - - nti 13 constraint DS = {13} extremes [2, infinity) - English: - size {***} - constraint DS = {13} extremes [2, infinity) - font {} {***} - constraint DS = {13} extremes [2, infinity) - colour {} {***} - constraint DS = {13} extremes [2, infinity) - at from {...} - constraint DS = {13} extremes [4, infinity) - at {***} - constraint DS = {13} extremes [2, infinity) - - hits 1/292 nti 14 constraint CS = {14} extremes [1, 1] + hits 1/292 nti 7 constraint CS = {7} extremes [1, 1] English: recurring - (hits 1/5) (matched: 'recurring') constraint CS = {14} extremes [1, 1] + (hits 1/5) (matched: 'recurring') constraint CS = {7} extremes [1, 1] - hits 1/2 nti 15 constraint CS = {15} extremes [2, 2] + hits 1/2 nti 8 constraint CS = {8} extremes [2, 2] English: entire game - (hits 1/1) (matched: 'entire game') constraint CS = {15} extremes [2, 2] + (hits 1/1) (matched: 'entire game') constraint CS = {8} extremes [2, 2] - hits 4/8 nti 18 constraint (none) extremes [1, infinity) + hits 4/8 nti 13 constraint (none) extremes [1, infinity) English: (hits 4/4) (matched: 'the entire game') constraint (none) extremes [1, infinity) {...} constraint (none) extremes [1, infinity) - nti 19 constraint (none) extremes [1, infinity) + nti 14 constraint (none) extremes [1, infinity) English: constraint (none) extremes [1, infinity) - hits 0/4 nti 16 constraint (none) extremes [1, infinity) + hits 0/4 nti 9 constraint (none) extremes [1, infinity) English: (hits 0/1) constraint DS = {15} extremes [5, infinity) play begins - constraint CS = {16} extremes [2, 2] + constraint CS = {9} extremes [2, 2] play ends - constraint CS = {16} extremes [2, 2] + constraint CS = {9} extremes [2, 2] begins - (hits 0/1) constraint DS = {16} extremes [2, infinity) + (hits 0/2) constraint DS = {9} extremes [2, infinity) ends - (hits 0/1) constraint DS = {16} extremes [2, infinity) + (hits 0/2) constraint DS = {9} extremes [2, infinity) ends - (hits 0/1) constraint DS = {16} extremes [3, infinity) + (hits 0/2) constraint DS = {9} extremes [3, infinity) ends {...} - (hits 0/1) constraint DS = {16} extremes [3, infinity) + (hits 0/2) constraint DS = {9} extremes [3, infinity) (hits 0/2) constraint (none) extremes [1, infinity) - hits 4/8 nti 20 constraint (none) extremes [1, infinity) + hits 4/8 nti 15 constraint (none) extremes [1, infinity) English: (hits 4/4) (matched: 'the entire game') constraint (none) extremes [2, infinity) constraint (none) extremes [1, infinity) - hits 4/8 nti 21 constraint (none) extremes [1, infinity) + hits 4/8 nti 16 constraint (none) extremes [1, infinity) English: (hits 4/4) (matched: 'entire game') constraint (none) extremes [1, infinity) - internal nti 22 constraint (none) extremes [1, infinity) + internal nti 17 constraint (none) extremes [1, infinity) - internal nti 23 constraint (none) extremes [1, infinity) + internal nti 18 constraint (none) extremes [1, infinity) - nti 24 constraint (none) extremes [1, infinity) + nti 19 constraint (none) extremes [1, infinity) English: constraint (none) extremes [1, infinity) - hits 2/186 nti 17 constraint CS = {17} extremes [1, 2] + hits 2/186 nti 10 constraint CS = {10} extremes [1, 2] English: score - (hits 1/2) (matched: 'score') constraint CS = {17} extremes [1, 1] + (hits 1/1) (matched: 'score') constraint CS = {10} extremes [1, 1] maximum score - (hits 1/2) (matched: 'maximum score') constraint CS = {17} extremes [2, 2] + (hits 1/1) (matched: 'maximum score') constraint CS = {10} extremes [2, 2] - hits 0/14 nti 18 constraint CS = {18} extremes [1, 1] + hits 0/14 nti 11 constraint CS = {11} extremes [1, 1] English: rankings - constraint CS = {18} extremes [1, 1] + constraint CS = {11} extremes [1, 1] - hits 2/180 nti 19 constraint CS = {19} extremes [1, 1] + hits 2/180 nti 12 constraint CS = {12} extremes [1, 1] English: waiting - (hits 1/2) (matched: 'waiting') constraint CS = {19} extremes [1, 1] + (hits 1/20) (matched: 'waiting') constraint CS = {12} extremes [1, 1] going - (hits 1/1) (matched: 'going') constraint CS = {19} extremes [1, 1] + (hits 1/19) (matched: 'going') constraint CS = {12} extremes [1, 1] - nti 20 constraint DS = {20} extremes [2, infinity) + nti 13 constraint DS = {13} extremes [2, infinity) English: {...} action - constraint DS = {20} extremes [2, infinity) + constraint DS = {13} extremes [2, infinity) - hits 490/20500 nti 25 constraint (none) extremes [1, 1] + hits 490/20500 nti 20 constraint (none) extremes [1, 1] English: (hits 490/10250) (matched: 'it') constraint (none) extremes [1, 1] - internal hits 227/664 nti 26 constraint (none) extremes [1, infinity) + internal hits 227/664 nti 21 constraint (none) extremes [1, infinity) - hits 378/10710 nti 21 constraint DS = {21} extremes [2, infinity) + hits 378/10710 nti 14 constraint DS = {14} extremes [2, infinity) English: {...} to - (hits 378/1065) (matched: 'giving it to') constraint DS = {21} extremes [2, infinity) + (hits 378/2489) (matched: 'giving it to') constraint DS = {14} extremes [2, infinity) - hits 13/26 nti 22 constraint (none) extremes [1, infinity) + hits 13/26 nti 15 constraint (none) extremes [1, infinity) English: ( matched as {} ) - (hits 6/6) (matched: 'room gone from ( matched as from )') constraint DS = {22} extremes [6, infinity) + (hits 6/6) (matched: 'room gone from ( matched as from )') constraint DS = {15} extremes [6, infinity) ( {...} ) - constraint DS = {22} extremes [4, infinity) + constraint DS = {15} extremes [4, infinity) (hits 7/7) (matched: 'abbreviated form allowed') constraint (none) extremes [1, infinity) - hits 13/26 nti 27 constraint (none) extremes [1, infinity) + hits 13/26 nti 22 constraint (none) extremes [1, infinity) English: (hits 0/13) constraint (none) extremes [1, infinity) {...} (hits 13/13) (matched: 'room gone from') constraint (none) extremes [1, infinity) - hits 90/1036 nti 28 constraint DS = {23} extremes [1, infinity) + hits 90/1036 nti 23 constraint DS = {16} extremes [1, infinity) English: - (hits 90/352) (matched long text) constraint DS = {23} extremes [2, infinity) + (hits 90/189) (matched long text) constraint DS = {16} extremes [2, infinity) - (hits 0/263) constraint DS = {23} extremes [1, infinity) + (hits 0/99) constraint DS = {16} extremes [1, infinity) - hits 90/1014 nti 23 constraint DS = {23} extremes [1, infinity) + hits 90/388 nti 16 constraint DS = {16} extremes [1, infinity) English: action - (hits 90/396) (matched long text) constraint DS = {23} extremes [1, infinity) + (hits 90/194) (matched long text) constraint DS = {16} extremes [1, infinity) action - (hits 0/5) constraint CS = {23} extremes [1, 1] + constraint CS = {16} extremes [1, 1] - hits 90/182 nti 29 constraint (none) extremes [0, infinity) + hits 90/182 nti 24 constraint (none) extremes [0, infinity) English: ^ (hits 90/91) (matched long text) constraint (none) extremes [0, infinity) - hits 1/182 nti 24 constraint DS = {24} extremes [1, infinity) + hits 1/182 nti 17 constraint DS = {17} extremes [1, infinity) English: {***} that/which vary/varies - (hits 1/91) (matched: 'name based rule producing nothing that varies') constraint DS = {24} extremes [2, infinity) + (hits 1/33) (matched: 'name based rule producing nothing that varies') constraint DS = {17} extremes [2, infinity) {***} variable - (hits 0/90) constraint DS = {24} extremes [1, infinity) + (hits 0/32) constraint DS = {17} extremes [1, infinity) - hits 90/180 nti 30 constraint (none) extremes [1, infinity) + hits 90/180 nti 25 constraint (none) extremes [1, infinity) English: (hits 0/90) constraint (none) extremes [1, infinity) {...} (hits 90/90) (matched: 'switching the story transcript on') constraint (none) extremes [1, infinity) - hits 128/824 nti 27 constraint DS = {27} extremes [1, infinity) + hits 128/856 nti 20 constraint DS = {20} extremes [1, infinity) English: out of world - (hits 16/34) (matched: 'out of world') constraint CS = {27} extremes [3, 3] + (hits 16/79) (matched: 'out of world') constraint CS = {20} extremes [3, 3] abbreviable - (hits 2/37) (matched: 'abbreviable') constraint CS = {27} extremes [1, 1] + (hits 2/52) (matched: 'abbreviable') constraint CS = {20} extremes [1, 1] with past participle {...} - (hits 0/175) constraint DS = {27} extremes [4, infinity) + (hits 0/177) constraint DS = {20} extremes [4, infinity) applying to - (hits 104/290) (matched long text) constraint DS = {27} extremes [3, infinity) + (hits 104/292) (matched long text) constraint DS = {20} extremes [3, infinity) requiring light - (hits 6/38) (matched: 'requiring light') constraint CS = {27} extremes [2, 2] + (hits 6/53) (matched: 'requiring light') constraint CS = {20} extremes [2, 2] - hits 104/208 nti 26 constraint (none) extremes [1, infinity) + hits 104/208 nti 19 constraint (none) extremes [1, infinity) English: nothing - (hits 45/45) (matched: 'nothing') constraint CS = {26} extremes [1, 1] + (hits 45/45) (matched: 'nothing') constraint CS = {19} extremes [1, 1] one and one - (hits 11/11) (matched: 'one carried thing and one visible thing') constraint DS = {26} extremes [5, infinity) + (hits 11/11) (matched: 'one carried thing and one visible thing') constraint DS = {19} extremes [5, infinity) one and - (hits 0/2) constraint DS = {26} extremes [4, infinity) + (hits 0/2) constraint DS = {19} extremes [4, infinity) and one - (hits 0/2) constraint DS = {26} extremes [4, infinity) + (hits 0/2) constraint DS = {19} extremes [4, infinity) and - (hits 0/7) constraint DS = {26} extremes [3, infinity) + (hits 0/7) constraint DS = {19} extremes [3, infinity) nothing or one - (hits 2/2) (matched: 'nothing or one thing') constraint DS = {26} extremes [4, infinity) + (hits 2/2) (matched: 'nothing or one thing') constraint DS = {19} extremes [4, infinity) one - (hits 40/46) (matched: 'one visible thing') constraint DS = {26} extremes [2, infinity) + (hits 40/46) (matched: 'one visible thing') constraint DS = {19} extremes [2, infinity) two - (hits 6/6) (matched: 'two things') constraint DS = {26} extremes [2, infinity) + (hits 6/6) (matched: 'two things') constraint DS = {19} extremes [2, infinity) constraint (none) extremes [1, infinity) {...} constraint (none) extremes [1, infinity) - hits 70/140 nti 31 constraint (none) extremes [1, infinity) + hits 70/140 nti 26 constraint (none) extremes [1, infinity) English: (hits 70/70) (matched: 'visible thing') constraint (none) extremes [1, infinity) - hits 70/140 nti 6 constraint (none) extremes [1, infinity) + hits 70/140 nti 27 constraint (none) extremes [1, infinity) English: - (hits 12/12) (matched: 'visible thing') constraint DS = {25} extremes [2, infinity) + (hits 12/12) (matched: 'visible thing') constraint DS = {18} extremes [2, infinity) (hits 58/58) (matched: 'infection color') constraint (none) extremes [1, infinity) - hits 12/24 nti 25 constraint CS = {25} extremes [1, 1] + hits 12/24 nti 18 constraint CS = {18} extremes [1, 1] English: visible - (hits 6/12) (matched: 'visible') constraint CS = {25} extremes [1, 1] + (hits 6/12) (matched: 'visible') constraint CS = {18} extremes [1, 1] touchable - (hits 0/6) constraint CS = {25} extremes [1, 1] + (hits 0/6) constraint CS = {18} extremes [1, 1] carried - (hits 6/6) (matched: 'carried') constraint CS = {25} extremes [1, 1] + (hits 6/6) (matched: 'carried') constraint CS = {18} extremes [1, 1] - hits 90/180 nti 7 constraint (none) extremes [1, infinity) + hits 90/180 nti 28 constraint (none) extremes [1, infinity) English: (hits 90/90) (matched long text) constraint (none) extremes [1, infinity) {...} constraint (none) extremes [1, infinity) - hits 128/256 nti 8 constraint (none) extremes [1, infinity) + hits 128/256 nti 29 constraint (none) extremes [1, infinity) English: {...} (hits 19/128) (matched: 'applying to nothing or one thing and') constraint (none) extremes [1, infinity) - (hits 19/109) (matched: 'applying to one visible thing and requiring light') constraint DS = {27} extremes [2, infinity) + (hits 19/109) (matched: 'applying to one visible thing and requiring light') constraint DS = {20} extremes [2, infinity) - (hits 90/90) (matched long text) constraint DS = {27} extremes [1, infinity) + (hits 90/90) (matched long text) constraint DS = {20} extremes [1, infinity) - hits 128/1002 nti 28 constraint DS = {27} extremes [1, infinity) + hits 128/1002 nti 21 constraint DS = {20} extremes [1, infinity) English: , and - (hits 0/302) constraint DS = {27, 28} extremes [3, infinity) + (hits 0/303) constraint DS = {20, 21} extremes [3, infinity) and - (hits 19/338) (matched: 'applying to nothing or one thing and') constraint DS = {27, 28} extremes [2, infinity) + (hits 19/339) (matched: 'applying to nothing or one thing and') constraint DS = {20, 21} extremes [2, infinity) , - (hits 0/319) constraint DS = {27, 28} extremes [2, infinity) + (hits 0/320) constraint DS = {20, 21} extremes [2, infinity) - (hits 109/347) (matched long text) constraint DS = {27} extremes [1, infinity) + (hits 109/363) (matched long text) constraint DS = {20} extremes [1, infinity) - hits 958/2310 nti 7 constraint (none) extremes [1, infinity) + hits 958/2310 nti 26 constraint (none) extremes [1, infinity) English: doing something/anything other than - (hits 0/184) constraint DS = {7} extremes [5, infinity) + (hits 0/142) constraint DS = {26} extremes [5, infinity) doing something/anything except - (hits 0/242) constraint DS = {7} extremes [4, infinity) + (hits 0/183) constraint DS = {26} extremes [4, infinity) doing something/anything to/with - (hits 0/242) constraint DS = {7} extremes [4, infinity) + (hits 0/183) constraint DS = {26} extremes [4, infinity) doing something/anything - constraint CS = {7} extremes [2, 2] + constraint CS = {26} extremes [2, 2] doing something/anything {...} - (hits 0/452) constraint DS = {7} extremes [3, infinity) + (hits 0/378) constraint DS = {26} extremes [3, infinity) (hits 958/1155) (matched long text) constraint (none) extremes [1, infinity) - nti 6 constraint (none) extremes [1, infinity) + nti 25 constraint (none) extremes [1, infinity) English: to/with {} - constraint DS = {6} extremes [3, infinity) + constraint DS = {25} extremes [3, infinity) constraint (none) extremes [1, infinity) - nti 31 constraint (none) extremes [1, infinity) + nti 24 constraint (none) extremes [1, infinity) English: _,/or {...} - constraint DS = {31} extremes [2, infinity) + constraint DS = {24} extremes [2, infinity) {...} to/with {...} - constraint DS = {31} extremes [3, infinity) + constraint DS = {24} extremes [3, infinity) {...} constraint (none) extremes [1, infinity) - hits 326/652 nti 9 constraint (none) extremes [1, infinity) + hits 326/652 nti 30 constraint (none) extremes [1, infinity) English: - (hits 0/97) constraint DS = {29} extremes [3, infinity) + (hits 0/97) constraint DS = {22} extremes [3, infinity) (hits 326/326) (matched long text) constraint (none) extremes [1, infinity) - hits 326/652 nti 10 constraint (none) extremes [1, infinity) + hits 326/652 nti 31 constraint (none) extremes [1, infinity) English: {...} (hits 326/326) (matched long text) constraint (none) extremes [1, infinity) - hits 12/4756 nti 29 constraint DS = {29} extremes [2, infinity) + hits 12/4748 nti 22 constraint DS = {22} extremes [2, infinity) English: fixed in place {***} - (hits 0/987) constraint DS = {29} extremes [3, infinity) + (hits 0/963) constraint DS = {22} extremes [3, infinity) is/are/was/were/been/listed in {***} - (hits 0/1439) constraint DS = {29} extremes [2, infinity) + (hits 0/1393) constraint DS = {22} extremes [2, infinity) in {...} - (hits 12/1439) (matched: 'in the public library') constraint DS = {29} extremes [2, infinity) + (hits 12/1393) (matched: 'in the public library') constraint DS = {22} extremes [2, infinity) - hits 958/2310 nti 11 constraint (none) extremes [1, infinity) + hits 958/2310 nti 6 constraint (none) extremes [1, infinity) English: - (hits 0/304) constraint DS = {30} extremes [3, infinity) + (hits 0/422) constraint DS = {23} extremes [3, infinity) (hits 958/1155) (matched long text) constraint (none) extremes [1, infinity) - hits 0/2742 nti 30 constraint DS = {30} extremes [2, infinity) + hits 0/3474 nti 23 constraint DS = {23} extremes [2, infinity) English: , _or - (hits 0/708) constraint DS = {30} extremes [3, infinity) + (hits 0/819) constraint DS = {23} extremes [3, infinity) _,/or - (hits 0/897) constraint DS = {30} extremes [2, infinity) + (hits 0/1087) constraint DS = {23} extremes [2, infinity) - hits 958/2310 nti 12 constraint (none) extremes [1, infinity) + hits 958/2310 nti 7 constraint (none) extremes [1, infinity) English: (hits 0/1155) constraint (none) extremes [1, infinity) - (hits 0/454) constraint DS = {29} extremes [3, infinity) + (hits 0/452) constraint DS = {22} extremes [3, infinity) (hits 958/1155) (matched long text) constraint (none) extremes [1, infinity) - internal hits 0/2330 nti 13 constraint (none) extremes [1, infinity) + internal hits 0/2330 nti 8 constraint (none) extremes [1, infinity) - internal hits 958/2310 nti 14 constraint (none) extremes [1, infinity) + internal hits 958/2310 nti 9 constraint (none) extremes [1, infinity) - hits 556/21224 nti 8 constraint (none) extremes [1, infinity) + hits 556/21224 nti 27 constraint (none) extremes [1, infinity) English: asking to try - (hits 0/951) constraint DS = {8} extremes [5, infinity) + (hits 0/971) constraint DS = {27} extremes [5, infinity) trying - (hits 23/1974) (matched long text) constraint DS = {8} extremes [3, infinity) + (hits 23/2427) (matched long text) constraint DS = {27} extremes [3, infinity) an actor trying - (hits 0/1553) constraint DS = {8} extremes [4, infinity) + (hits 0/1605) constraint DS = {27} extremes [4, infinity) an actor - (hits 408/1951) (matched long text) constraint DS = {8} extremes [3, infinity) + (hits 408/2404) (matched long text) constraint DS = {27} extremes [3, infinity) trying - (hits 0/1770) constraint DS = {8} extremes [2, infinity) + (hits 0/2642) constraint DS = {27} extremes [2, infinity) (hits 125/10181) (matched long text) constraint (none) extremes [1, infinity) @@ -9342,19 +9232,19 @@ we are asking to try (hits 0/231) constraint DS = {13} extremes [7, infinity) asking to try - (hits 0/585) constraint DS = {13} extremes [5, infinity) + (hits 0/593) constraint DS = {13} extremes [5, infinity) trying - (hits 0/951) constraint DS = {13} extremes [3, infinity) + (hits 0/953) constraint DS = {13} extremes [3, infinity) an actor trying - (hits 0/934) constraint DS = {13} extremes [4, infinity) + (hits 0/937) constraint DS = {13} extremes [4, infinity) an actor - (hits 3/951) (matched: 'an actor smelling') constraint DS = {13} extremes [3, infinity) + (hits 3/953) (matched: 'an actor smelling') constraint DS = {13} extremes [3, infinity) we are trying - (hits 0/934) constraint DS = {13} extremes [4, infinity) + (hits 0/937) constraint DS = {13} extremes [4, infinity) trying - (hits 0/954) constraint DS = {13} extremes [2, infinity) + (hits 0/956) constraint DS = {13} extremes [2, infinity) we are - (hits 0/948) constraint DS = {13} extremes [3, infinity) + (hits 0/950) constraint DS = {13} extremes [3, infinity) (hits 25/1370) (matched long text) constraint (none) extremes [1, infinity) @@ -9379,20 +9269,20 @@ not (hits 0/1104) constraint DS = {14} extremes [2, infinity) - hits 0/2190 nti 11 constraint DS = {11} extremes [3, infinity) + hits 0/2206 nti 11 constraint DS = {11} extremes [3, infinity) English: we have asked to try (hits 0/231) constraint DS = {11} extremes [7, infinity) has tried - (hits 0/998) constraint DS = {11} extremes [4, infinity) + (hits 0/994) constraint DS = {11} extremes [4, infinity) an actor has tried - (hits 0/623) constraint DS = {11} extremes [5, infinity) + (hits 0/619) constraint DS = {11} extremes [5, infinity) an actor has - (hits 0/998) constraint DS = {11} extremes [4, infinity) + (hits 0/994) constraint DS = {11} extremes [4, infinity) we have tried - (hits 0/998) constraint DS = {11} extremes [4, infinity) + (hits 0/994) constraint DS = {11} extremes [4, infinity) we have - (hits 0/1095) constraint DS = {11} extremes [3, infinity) + (hits 0/1103) constraint DS = {11} extremes [3, infinity) hits 0/1890 nti 12 constraint DS = {12} extremes [4, infinity) English: @@ -9409,77 +9299,77 @@ we have not (hits 0/945) constraint DS = {12} extremes [4, infinity) - hits 150/23102 nti 15 constraint (none) extremes [1, infinity) + hits 150/23102 nti 10 constraint (none) extremes [1, infinity) English: (hits 85/11551) (matched long text) constraint (none) extremes [1, infinity) (hits 65/6518) (matched long text) constraint (none) extremes [2, infinity) - internal hits 76/13036 nti 16 constraint (none) extremes [1, infinity) + internal hits 76/13036 nti 11 constraint (none) extremes [1, infinity) - internal hits 584/24122 nti 17 constraint (none) extremes [1, infinity) + internal hits 584/24122 nti 12 constraint (none) extremes [1, infinity) - internal nti 18 constraint (none) extremes [1, infinity) + internal nti 13 constraint (none) extremes [1, infinity) - hits 0/1390 nti 9 constraint CS = {9} extremes [2, 2] + hits 0/1390 nti 28 constraint CS = {28} extremes [2, 2] English: doing it - constraint CS = {9} extremes [2, 2] + constraint CS = {28} extremes [2, 2] - hits 584/1390 nti 12 constraint (none) extremes [1, infinity) + hits 584/1390 nti 31 constraint (none) extremes [1, infinity) English: when/while - (hits 11/323) (matched long text) constraint DS = {12} extremes [3, infinity) + (hits 11/184) (matched long text) constraint DS = {31} extremes [3, infinity) (hits 573/684) (matched long text) constraint (none) extremes [1, infinity) {...} when/while - (hits 0/84) constraint DS = {12} extremes [3, infinity) + (hits 0/56) constraint DS = {31} extremes [3, infinity) {...} when/while {...} - (hits 0/84) constraint DS = {12} extremes [3, infinity) + (hits 0/56) constraint DS = {31} extremes [3, infinity) - internal hits 19/38 nti 19 constraint (none) extremes [1, infinity) + internal hits 19/38 nti 14 constraint (none) extremes [1, infinity) - hits 584/1406 nti 11 constraint (none) extremes [1, infinity) + hits 584/1406 nti 30 constraint (none) extremes [1, infinity) English: in the presence of - (hits 1/50) (matched long text) constraint DS = {11} extremes [6, infinity) + (hits 1/46) (matched long text) constraint DS = {30} extremes [6, infinity) (hits 583/702) (matched long text) constraint (none) extremes [1, infinity) - hits 584/1406 nti 10 constraint (none) extremes [1, infinity) + hits 584/1406 nti 29 constraint (none) extremes [1, infinity) English: in - (hits 0/141) constraint DS = {10} extremes [2, infinity) + (hits 0/284) constraint DS = {29} extremes [2, infinity) (hits 584/703) (matched long text) constraint (none) extremes [1, infinity) - internal hits 584/1406 nti 20 constraint (none) extremes [1, infinity) + internal hits 584/1406 nti 15 constraint (none) extremes [1, infinity) - hits 194/444 nti 13 constraint (none) extremes [1, infinity) + hits 194/444 nti 6 constraint (none) extremes [1, infinity) English: something/anything - (hits 78/79) (matched: 'something') constraint CS = {13} extremes [1, 1] + (hits 78/78) (matched: 'something') constraint CS = {6} extremes [1, 1] something/anything else - (hits 0/9) constraint CS = {13} extremes [2, 2] + (hits 0/6) constraint CS = {6} extremes [2, 2] (hits 116/144) (matched long text) constraint (none) extremes [1, infinity) - hits 0/18 nti 14 constraint CS = {14} extremes [1, 1] + hits 0/18 nti 7 constraint CS = {7} extremes [1, 1] English: nowhere - constraint CS = {14} extremes [1, 1] + constraint CS = {7} extremes [1, 1] somewhere - constraint CS = {14} extremes [1, 1] + constraint CS = {7} extremes [1, 1] - hits 5/10 nti 15 constraint CS = {15} extremes [1, 1] + hits 5/10 nti 8 constraint CS = {8} extremes [1, 1] English: something/anything - (hits 4/5) (matched: 'something') constraint CS = {15} extremes [1, 1] + (hits 4/5) (matched: 'something') constraint CS = {8} extremes [1, 1] it - (hits 1/1) (matched: 'it') constraint CS = {15} extremes [1, 1] + (hits 1/1) (matched: 'it') constraint CS = {8} extremes [1, 1] - hits 276/1144 nti 21 constraint (none) extremes [1, infinity) + hits 276/1144 nti 16 constraint (none) extremes [1, infinity) English: ^ (hits 0/572) constraint (none) extremes [1, infinity) @@ -9492,130 +9382,130 @@ (hits 209/505) (matched long text) constraint (none) extremes [1, infinity) - internal hits 1144/2288 nti 22 constraint (none) extremes [0, 0] + internal hits 1144/2288 nti 17 constraint (none) extremes [0, 0] - hits 21/186 nti 16 constraint DS = {16} extremes [1, infinity) + hits 21/186 nti 9 constraint DS = {9} extremes [1, infinity) English: understood - (hits 16/27) (matched: 'command parser error understood') constraint DS = {16} extremes [2, infinity) + (hits 16/45) (matched: 'command parser error understood') constraint DS = {9} extremes [2, infinity) noun - (hits 1/3) (matched: 'noun') constraint CS = {16} extremes [1, 1] + (hits 1/3) (matched: 'noun') constraint CS = {9} extremes [1, 1] location - (hits 1/2) (matched: 'location') constraint CS = {16} extremes [1, 1] + (hits 1/2) (matched: 'location') constraint CS = {9} extremes [1, 1] actor-location - (hits 1/1) (matched: 'actor-location') constraint CS = {16} extremes [1, 1] + (hits 1/1) (matched: 'actor-location') constraint CS = {9} extremes [1, 1] second noun - (hits 1/2) (matched: 'second noun') constraint CS = {16} extremes [2, 2] + (hits 1/8) (matched: 'second noun') constraint CS = {9} extremes [2, 2] person asked - (hits 1/1) (matched: 'person asked') constraint CS = {16} extremes [2, 2] + (hits 1/7) (matched: 'person asked') constraint CS = {9} extremes [2, 2] - hits 208/416 nti 20 constraint (none) extremes [1, infinity) + hits 208/416 nti 13 constraint (none) extremes [1, infinity) English: nothing - constraint CS = {20} extremes [1, 1] + constraint CS = {13} extremes [1, 1] (hits 1/208) (matched: 'the infection color property') constraint (none) extremes [1, infinity) the command/commands - (hits 40/40) (matched long text) constraint DS = {20} extremes [3, infinity) + (hits 40/40) (matched long text) constraint DS = {13} extremes [3, infinity) the verb/verbs {...} - constraint DS = {20} extremes [3, infinity) + constraint DS = {13} extremes [3, infinity) (hits 167/167) (matched long text) constraint (none) extremes [1, infinity) - hits 383/766 nti 23 constraint (none) extremes [1, infinity) + hits 383/766 nti 18 constraint (none) extremes [1, infinity) English: {...} (hits 88/383) (matched long text) constraint (none) extremes [1, infinity) - (hits 88/88) (matched long text) constraint DS = {19} extremes [3, infinity) + (hits 88/88) (matched long text) constraint DS = {12} extremes [3, infinity) (hits 207/207) (matched: '"n"') constraint (none) extremes [1, infinity) - hits 176/352 nti 19 constraint DS = {19} extremes [2, infinity) + hits 176/352 nti 12 constraint DS = {12} extremes [2, infinity) English: , _and/or - (hits 0/74) constraint DS = {19} extremes [3, infinity) + (hits 0/74) constraint DS = {12} extremes [3, infinity) _,/and/or - (hits 176/176) (matched long text) constraint DS = {19} extremes [2, infinity) + (hits 176/176) (matched long text) constraint DS = {12} extremes [2, infinity) - hits 383/766 nti 24 constraint (none) extremes [1, infinity) + hits 383/766 nti 19 constraint (none) extremes [1, infinity) English: {...} (hits 383/383) (matched: '"n"') constraint (none) extremes [1, infinity) - hits 70/554 nti 25 constraint (none) extremes [1, infinity) + hits 50/514 nti 20 constraint (none) extremes [1, infinity) English: {...} - (hits 69/277) (matched long text) constraint (none) extremes [1, infinity) + (hits 49/257) (matched long text) constraint (none) extremes [1, infinity) - (hits 0/32) constraint DS = {17, 18} extremes [4, infinity) + (hits 0/24) constraint DS = {10, 11} extremes [4, infinity) - (hits 1/52) (matched: 'the infection color property') constraint DS = {17} extremes [2, infinity) + (hits 1/25) (matched: 'the infection color property') constraint DS = {10} extremes [2, infinity) - hits 69/372 nti 18 constraint DS = {18} extremes [2, infinity) + hits 49/292 nti 11 constraint DS = {11} extremes [2, infinity) English: , _and/or - (hits 0/122) constraint DS = {18} extremes [3, infinity) + (hits 0/98) constraint DS = {11} extremes [3, infinity) _,/and/or - (hits 69/154) (matched long text) constraint DS = {18} extremes [2, infinity) + (hits 49/122) (matched long text) constraint DS = {11} extremes [2, infinity) - hits 1/242 nti 17 constraint DS = {17} extremes [2, infinity) + hits 1/148 nti 10 constraint DS = {10} extremes [2, infinity) English: property - (hits 1/89) (matched: 'the infection color property') constraint DS = {17} extremes [2, infinity) + (hits 1/50) (matched: 'the infection color property') constraint DS = {10} extremes [2, infinity) {...} property - (hits 0/88) constraint DS = {17} extremes [2, infinity) + (hits 0/49) constraint DS = {10} extremes [2, infinity) - hits 167/334 nti 23 constraint (none) extremes [1, infinity) + hits 167/334 nti 16 constraint (none) extremes [1, infinity) English: when/while {...} - (hits 1/24) (matched: 'yourself when the player is not yourself') constraint DS = {23} extremes [3, infinity) + (hits 1/14) (matched: 'yourself when the player is not yourself') constraint DS = {16} extremes [3, infinity) (hits 166/166) (matched: 'giving it to ( with nouns reversed )') constraint (none) extremes [1, infinity) - hits 167/334 nti 26 constraint (none) extremes [1, infinity) + hits 167/334 nti 21 constraint (none) extremes [1, infinity) English: {...} (hits 0/167) constraint (none) extremes [1, infinity) - (hits 0/23) constraint DS = {22} extremes [3, infinity) + (hits 0/18) constraint DS = {15} extremes [3, infinity) (hits 167/167) (matched: 'giving it to ( with nouns reversed )') constraint (none) extremes [1, infinity) - hits 0/168 nti 22 constraint DS = {22} extremes [2, infinity) + hits 0/144 nti 15 constraint DS = {15} extremes [2, infinity) English: , _and/or - (hits 0/35) constraint DS = {22} extremes [3, infinity) + (hits 0/36) constraint DS = {15} extremes [3, infinity) _,/and/or - (hits 0/53) constraint DS = {22} extremes [2, infinity) + (hits 0/54) constraint DS = {15} extremes [2, infinity) - hits 167/334 nti 27 constraint (none) extremes [1, infinity) + hits 167/334 nti 22 constraint (none) extremes [1, infinity) English: (hits 167/167) (matched: 'giving it to ( with nouns reversed )') constraint (none) extremes [1, infinity) - hits 167/334 nti 21 constraint (none) extremes [1, infinity) + hits 167/334 nti 14 constraint (none) extremes [1, infinity) English: {...} (hits 0/167) constraint (none) extremes [1, infinity) a mistake - constraint CS = {21} extremes [2, 2] + (hits 0/7) constraint CS = {14} extremes [2, 2] a mistake ( ) - (hits 0/3) constraint DS = {21} extremes [5, 5] + (hits 0/3) constraint DS = {14} extremes [5, 5] a mistake {...} - (hits 0/40) constraint DS = {21} extremes [3, infinity) + (hits 0/54) constraint DS = {14} extremes [3, infinity) the plural of - (hits 0/11) constraint DS = {21} extremes [4, infinity) + (hits 0/13) constraint DS = {14} extremes [4, infinity) plural of - (hits 0/40) constraint DS = {21} extremes [3, infinity) + (hits 0/54) constraint DS = {14} extremes [3, infinity) (hits 2/73) (matched: '"[ice cream]"') constraint (none) extremes [1, 1] ( with nouns reversed ) - (hits 6/6) (matched: 'giving it to ( with nouns reversed )') constraint DS = {21} extremes [6, infinity) + (hits 6/6) (matched: 'giving it to ( with nouns reversed )') constraint DS = {14} extremes [6, infinity) (hits 159/159) (matched: 'requesting the story file version') constraint (none) extremes [1, infinity) - hits 165/330 nti 28 constraint (none) extremes [1, infinity) + hits 165/330 nti 23 constraint (none) extremes [1, infinity) English: (hits 150/165) (matched: 'requesting the story file version') constraint (none) extremes [1, infinity) @@ -9626,34 +9516,34 @@ {...} constraint (none) extremes [1, infinity) - hits 40/80 nti 24 constraint (none) extremes [1, infinity) + hits 40/80 nti 17 constraint (none) extremes [1, infinity) English: {...} when/while {...} - constraint DS = {24} extremes [3, infinity) + constraint DS = {17} extremes [3, infinity) something new - (hits 3/3) (matched: 'something new') constraint CS = {24} extremes [2, 2] + (hits 3/3) (matched: 'something new') constraint CS = {17} extremes [2, 2] (hits 37/37) (matched: 'take') constraint (none) extremes [1, 1] {...} constraint (none) extremes [1, infinity) - hits 1/2 nti 26 constraint (none) extremes [1, infinity) + hits 1/2 nti 19 constraint (none) extremes [1, infinity) English: when/while {...} - (hits 0/1) constraint DS = {26} extremes [3, infinity) + constraint DS = {19} extremes [3, infinity) (hits 1/1) (matched: 'referring to an ice cream cone') constraint (none) extremes [1, infinity) - hits 1/2 nti 25 constraint (none) extremes [1, infinity) + hits 1/2 nti 18 constraint (none) extremes [1, infinity) English: referring to - (hits 1/1) (matched: 'referring to an ice cream cone') constraint DS = {25} extremes [3, infinity) + (hits 1/1) (matched: 'referring to an ice cream cone') constraint DS = {18} extremes [3, infinity) describing - constraint DS = {25} extremes [2, infinity) + constraint DS = {18} extremes [2, infinity) {...} constraint (none) extremes [1, infinity) - hits 1/2 nti 29 constraint (none) extremes [1, infinity) + hits 1/2 nti 24 constraint (none) extremes [1, infinity) English: (hits 1/1) (matched: 'an ice cream cone') constraint (none) extremes [1, infinity) @@ -9662,7 +9552,7 @@ {...} constraint (none) extremes [1, infinity) - hits 4/8 nti 30 constraint (none) extremes [1, infinity) + hits 4/8 nti 25 constraint (none) extremes [1, infinity) English: (hits 4/4) (matched: 'the player is not yourself') constraint (none) extremes [1, infinity) @@ -9671,39 +9561,39 @@ {...} constraint (none) extremes [1, infinity) - hits 910/1820 nti 27 constraint (none) extremes [1, infinity) + hits 910/1820 nti 20 constraint (none) extremes [1, infinity) English: {...} , {...} - (hits 340/340) (matched long text) constraint DS = {27} extremes [3, infinity) + (hits 340/340) (matched long text) constraint DS = {20} extremes [3, infinity) (hits 400/526) (matched: 'n') constraint (none) extremes [1, 1] {...} (hits 170/170) (matched: 'a locked lockable thing') constraint (none) extremes [1, infinity) - hits 163/326 nti 29 constraint (none) extremes [1, infinity) + hits 163/326 nti 22 constraint (none) extremes [1, infinity) English: (hits 3/163) (matched: 'flavored ice cream') constraint (none) extremes [1, infinity) any things - constraint CS = {29} extremes [2, 2] + constraint CS = {22} extremes [2, 2] any - (hits 2/36) (matched: 'any room') constraint DS = {29} extremes [2, infinity) + (hits 2/26) (matched: 'any room') constraint DS = {22} extremes [2, infinity) anything - (hits 0/92) constraint CS = {29} extremes [1, 1] + (hits 0/92) constraint CS = {22} extremes [1, 1] anybody - (hits 0/92) constraint CS = {29} extremes [1, 1] + (hits 0/92) constraint CS = {22} extremes [1, 1] anyone - (hits 0/92) constraint CS = {29} extremes [1, 1] + (hits 0/92) constraint CS = {22} extremes [1, 1] anywhere - (hits 0/92) constraint CS = {29} extremes [1, 1] + (hits 0/92) constraint CS = {22} extremes [1, 1] something related by reversed - constraint DS = {29} extremes [5, infinity) + constraint DS = {22} extremes [5, infinity) something related by - (hits 0/5) constraint DS = {29} extremes [4, infinity) + constraint DS = {22} extremes [4, infinity) something related by {...} - (hits 0/5) constraint DS = {29} extremes [4, infinity) + constraint DS = {22} extremes [4, infinity) - (hits 138/138) (matched: 'something preferably held') constraint CS = {28} extremes [1, 3] + (hits 138/138) (matched: 'something preferably held') constraint CS = {21} extremes [1, 3] (hits 0/13) constraint (none) extremes [2, infinity) @@ -9713,176 +9603,286 @@ {...} constraint (none) extremes [1, infinity) - hits 138/276 nti 28 constraint CS = {28} extremes [1, 3] + hits 138/276 nti 21 constraint CS = {21} extremes [1, 3] English: something - (hits 88/115) (matched: 'something') constraint CS = {28} extremes [1, 1] + (hits 88/115) (matched: 'something') constraint CS = {21} extremes [1, 1] things - (hits 4/27) (matched: 'things') constraint CS = {28} extremes [1, 1] + (hits 4/27) (matched: 'things') constraint CS = {21} extremes [1, 1] things inside - (hits 4/9) (matched: 'things inside') constraint CS = {28} extremes [2, 2] + (hits 4/9) (matched: 'things inside') constraint CS = {21} extremes [2, 2] things preferably held - (hits 3/14) (matched: 'things preferably held') constraint CS = {28} extremes [3, 3] + (hits 3/14) (matched: 'things preferably held') constraint CS = {21} extremes [3, 3] something preferably held - (hits 11/11) (matched: 'something preferably held') constraint CS = {28} extremes [3, 3] + (hits 11/11) (matched: 'something preferably held') constraint CS = {21} extremes [3, 3] other things - (hits 5/5) (matched: 'other things') constraint CS = {28} extremes [2, 2] + (hits 5/5) (matched: 'other things') constraint CS = {21} extremes [2, 2] someone - (hits 15/23) (matched: 'someone') constraint CS = {28} extremes [1, 1] + (hits 15/23) (matched: 'someone') constraint CS = {21} extremes [1, 1] somebody - (hits 0/8) constraint CS = {28} extremes [1, 1] + (hits 0/8) constraint CS = {21} extremes [1, 1] text - (hits 8/8) (matched: 'text') constraint CS = {28} extremes [1, 1] + (hits 8/8) (matched: 'text') constraint CS = {21} extremes [1, 1] topic - constraint CS = {28} extremes [1, 1] + constraint CS = {21} extremes [1, 1] a topic - constraint CS = {28} extremes [2, 2] + constraint CS = {21} extremes [2, 2] object - constraint CS = {28} extremes [1, 1] + constraint CS = {21} extremes [1, 1] an object - constraint CS = {28} extremes [2, 2] + constraint CS = {21} extremes [2, 2] something held - constraint CS = {28} extremes [2, 2] + constraint CS = {21} extremes [2, 2] things held - constraint CS = {28} extremes [2, 2] + constraint CS = {21} extremes [2, 2] - internal hits 3/326 nti 31 constraint (none) extremes [1, infinity) + internal hits 3/326 nti 26 constraint (none) extremes [1, infinity) - hits 1/4 nti 6 constraint DS = {30} extremes [2, infinity) + hits 1/4 nti 27 constraint DS = {23} extremes [2, infinity) English: - (hits 1/2) (matched: 'the file of cover art ( The cover art. )') constraint DS = {30} extremes [3, infinity) + (hits 1/2) (matched: 'the file of cover art ( The cover art. )') constraint DS = {23} extremes [3, infinity) - (hits 0/1) constraint DS = {30} extremes [2, infinity) + (hits 0/1) constraint DS = {23} extremes [2, infinity) - hits 1/4 nti 30 constraint DS = {30} extremes [2, infinity) + hits 1/4 nti 23 constraint DS = {23} extremes [2, infinity) English: file - (hits 1/2) (matched: 'file of cover art ( The cover art. )') constraint DS = {30} extremes [2, infinity) + (hits 1/2) (matched: 'file of cover art ( The cover art. )') constraint DS = {23} extremes [2, infinity) - hits 2/690 nti 31 constraint DS = {31} extremes [2, infinity) + hits 2/690 nti 24 constraint DS = {24} extremes [2, infinity) English: figure {...} - (hits 2/215) (matched: 'figure of cover') constraint DS = {31} extremes [2, infinity) + (hits 2/306) (matched: 'figure of cover') constraint DS = {24} extremes [2, infinity) - hits 1/2 nti 7 constraint (none) extremes [1, infinity) + hits 1/2 nti 26 constraint (none) extremes [1, infinity) English: ( ) - (hits 1/1) (matched: 'of cover art ( The cover art. )') constraint DS = {7} extremes [4, infinity) + (hits 1/1) (matched: 'of cover art ( The cover art. )') constraint DS = {26} extremes [4, infinity) constraint (none) extremes [1, infinity) - hits 1/2 nti 6 constraint (none) extremes [1, infinity) + hits 1/2 nti 25 constraint (none) extremes [1, infinity) English: of cover art - (hits 1/1) (matched: 'of cover art') constraint CS = {6} extremes [3, 3] + (hits 1/1) (matched: 'of cover art') constraint CS = {25} extremes [3, 3] constraint (none) extremes [1, 1] {...} constraint (none) extremes [1, infinity) - nti 8 constraint CS = {8} extremes [3, 3] + nti 27 constraint CS = {27} extremes [3, 3] English: of cover art - constraint CS = {8} extremes [3, 3] + constraint CS = {27} extremes [3, 3] - hits 0/2 nti 7 constraint DS = {9} extremes [2, infinity) + hits 0/2 nti 28 constraint DS = {28} extremes [2, infinity) English: - (hits 0/1) constraint DS = {9} extremes [3, infinity) + constraint DS = {28} extremes [3, infinity) - (hits 0/1) constraint DS = {9} extremes [2, infinity) + constraint DS = {28} extremes [2, infinity) - hits 0/2 nti 9 constraint DS = {9} extremes [2, infinity) + nti 28 constraint DS = {28} extremes [2, infinity) English: file - (hits 0/1) constraint DS = {9} extremes [2, infinity) + constraint DS = {28} extremes [2, infinity) - hits 1/688 nti 10 constraint DS = {10} extremes [2, infinity) + hits 1/688 nti 29 constraint DS = {29} extremes [2, infinity) English: sound {...} - (hits 1/155) (matched: 'sound name understood') constraint DS = {10} extremes [2, infinity) + (hits 1/238) (matched: 'sound name understood') constraint DS = {29} extremes [2, infinity) - nti 11 constraint (none) extremes [1, infinity) + nti 30 constraint (none) extremes [1, infinity) English: ( ) - constraint DS = {11} extremes [4, infinity) + constraint DS = {30} extremes [4, infinity) constraint (none) extremes [1, infinity) - nti 8 constraint (none) extremes [1, infinity) + nti 29 constraint (none) extremes [1, infinity) English: constraint (none) extremes [1, 1] {...} constraint (none) extremes [1, infinity) - hits 0/1070 nti 14 constraint (none) extremes [2, infinity) + hits 0/1070 nti 7 constraint (none) extremes [2, infinity) English: (hits 0/509) constraint (none) extremes [2, infinity) text - (hits 0/323) constraint DS = {13, 14} extremes [3, infinity) + (hits 0/312) constraint DS = {6, 7} extremes [3, infinity) binary - (hits 0/323) constraint DS = {13, 14} extremes [3, infinity) + (hits 0/312) constraint DS = {6, 7} extremes [3, infinity) - (hits 0/436) constraint DS = {13} extremes [2, infinity) + (hits 0/355) constraint DS = {6} extremes [2, infinity) - hits 0/872 nti 13 constraint DS = {13} extremes [2, infinity) + hits 0/710 nti 6 constraint DS = {6} extremes [2, infinity) English: {file ...} ( owned by ) - (hits 0/77) constraint DS = {13} extremes [7, infinity) + (hits 0/73) constraint DS = {6} extremes [7, infinity) {file ...} - (hits 0/436) constraint DS = {13} extremes [2, infinity) + (hits 0/355) constraint DS = {6} extremes [2, infinity) - nti 12 constraint (none) extremes [1, infinity) + nti 31 constraint (none) extremes [1, infinity) English: another project - constraint CS = {12} extremes [2, 2] + constraint CS = {31} extremes [2, 2] project {} - constraint DS = {12} extremes [2, 2] + constraint DS = {31} extremes [2, 2] {...} constraint (none) extremes [1, infinity) - nti 9 constraint (none) extremes [1, infinity) + nti 30 constraint (none) extremes [1, infinity) English: constraint (none) extremes [1, 1] {...} constraint (none) extremes [1, infinity) - nti 10 constraint DS = {15} extremes [2, infinity) + nti 31 constraint DS = {8} extremes [2, infinity) English: - constraint DS = {15} extremes [3, infinity) + constraint DS = {8} extremes [3, infinity) - constraint DS = {15} extremes [2, infinity) + constraint DS = {8} extremes [2, infinity) - nti 15 constraint DS = {15} extremes [2, infinity) + nti 8 constraint DS = {8} extremes [2, infinity) English: called - constraint DS = {15} extremes [2, infinity) + constraint DS = {8} extremes [2, infinity) - hits 0/688 nti 11 constraint (none) extremes [2, infinity) + hits 0/688 nti 6 constraint (none) extremes [2, infinity) English: (hits 0/330) constraint (none) extremes [2, infinity) - hits 447/2552 nti 16 constraint DS = {13, 16} extremes [6, infinity) + hits 447/2552 nti 9 constraint DS = {9, 13} extremes [6, infinity) English: {...} ( ) - (hits 424/885) (matched long text) constraint DS = {13, 16} extremes [6, infinity) + (hits 424/887) (matched long text) constraint DS = {9, 13} extremes [6, infinity) {...} -- -- - (hits 23/461) (matched long text) constraint DS = {13, 16} extremes [6, infinity) + (hits 23/463) (matched long text) constraint DS = {9, 13} extremes [6, infinity) hits 480/1188 nti 13 constraint DS = {13} extremes [3, 3] English: documented at {###} - (hits 480/510) (matched: 'documented at act_startvm') constraint DS = {13} extremes [3, 3] + (hits 480/505) (matched: 'documented at act_startvm') constraint DS = {13} extremes [3, 3] - nti 17 constraint DS = {17} extremes [2, infinity) + nti 10 constraint DS = {10} extremes [2, infinity) English: understood + constraint DS = {10} extremes [2, infinity) + + nti 11 constraint (none) extremes [1, 1] + English: + in + constraint CS = {11} extremes [1, 1] + of + constraint CS = {11} extremes [1, 1] +
    + constraint (none) extremes [1, 1] + + nti 7 constraint (none) extremes [1, infinity) + English: + + constraint (none) extremes [1, infinity) + + nti 16 constraint (none) extremes [1, infinity) + English: + eps file + constraint CS = {16} extremes [2, 2] + mapped as + constraint DS = {16} extremes [4, infinity) + {...} mapped as {...} + constraint DS = {16} extremes [4, infinity) + mapped + constraint DS = {12, 16} extremes [4, infinity) + {...} mapped {...} + constraint DS = {16} extremes [3, infinity) + set to + constraint DS = {16} extremes [4, infinity) + set to {...} + constraint DS = {16} extremes [4, infinity) + {...} set to {...} + constraint DS = {16} extremes [4, infinity) + rubric {} {***} + constraint DS = {16} extremes [2, infinity) + {...} + constraint (none) extremes [1, infinity) + + nti 12 constraint DS = {12} extremes [2, infinity) + English: + of/from + constraint DS = {12} extremes [3, infinity) + above + constraint DS = {12} extremes [2, infinity) + below + constraint DS = {12} extremes [2, infinity) + + nti 14 constraint (none) extremes [1, infinity) + English: + of + constraint DS = {14} extremes [3, infinity) + + constraint (none) extremes [1, infinity) + {...} of + constraint DS = {14} extremes [3, infinity) + + nti 8 constraint (none) extremes [1, infinity) + English: + + constraint (none) extremes [2, infinity) + + constraint (none) extremes [1, infinity) + + nti 13 constraint (none) extremes [1, infinity) + English: + first room + constraint CS = {13} extremes [2, 2] + level + constraint DS = {13} extremes [2, 2] + + constraint (none) extremes [1, infinity) + + constraint (none) extremes [1, infinity) + + internal nti 9 constraint (none) extremes [1, infinity) + + nti 10 constraint (none) extremes [1, 1] + English: + + constraint CS = {r0} extremes [1, 1] + + constraint (none) extremes [1, 1] + + constraint CS = {15} extremes [1, 1] + + constraint (none) extremes [1, 1] + {###} + constraint (none) extremes [1, 1] + + nti 15 constraint CS = {15} extremes [1, 1] + English: + on + constraint CS = {15} extremes [1, 1] + off + constraint CS = {15} extremes [1, 1] + + internal nti 11 constraint (none) extremes [1, 1] + + nti 17 constraint DS = {17} extremes [2, infinity) + English: + size {***} + constraint DS = {17} extremes [2, infinity) + font {} {***} + constraint DS = {17} extremes [2, infinity) + colour {} {***} + constraint DS = {17} extremes [2, infinity) + at from {...} + constraint DS = {17} extremes [4, infinity) + at {***} constraint DS = {17} extremes [2, infinity) nti 12 constraint (none) extremes [0, 0] diff --git a/inform7/Figures/memory-diagnostics.txt b/inform7/Figures/memory-diagnostics.txt index cd16ca592..42b1216e3 100644 --- a/inform7/Figures/memory-diagnostics.txt +++ b/inform7/Figures/memory-diagnostics.txt @@ -127,16 +127,17 @@ Total memory consumption was 258576K = 253 MB ---- compatibility_specification 66 objects, 3168 bytes ---- definition 44 objects, 3168 bytes ---- inform_extension 19 objects, 3040 bytes - ---- either_or_property_data 62 objects, 2976 bytes ---- property_of_value_storage 93 objects, 2976 bytes + ---- either_or_property_data 62 objects, 2976 bytes ---- submodule_request 72 objects, 2880 bytes ---- inter_construct 32 objects, 2560 bytes - ---- parentage_inference_data 79 objects, 2528 bytes ---- part_of_inference_data 79 objects, 2528 bytes + ---- parentage_inference_data 79 objects, 2528 bytes ---- kind_constructor_instance_array 1 x 100 objects, 2432 bytes ---- kind_constructor_casting_rule_array 1 x 100 objects, 2432 bytes ---- equation_symbol 30 objects, 2400 bytes ---- semver_range 22 objects, 2288 bytes + ---- scene 1 object, 2096 bytes ---- use_option 29 objects, 1856 bytes ---- pronoun_usage 42 objects, 1680 bytes ---- activity_crossref_array 1 x 100 objects, 1632 bytes @@ -146,7 +147,6 @@ Total memory consumption was 258576K = 253 MB ---- plugin 23 objects, 1472 bytes ---- pipeline_step 12 objects, 1440 bytes ---- noun_filter_token 22 objects, 1408 bytes - ---- scene 1 object, 1344 bytes ---- special_meaning_holder 33 objects, 1320 bytes ---- build_script 40 objects, 1280 bytes ---- constant_phrase 20 objects, 1280 bytes @@ -216,19 +216,19 @@ Total memory consumption was 258576K = 253 MB ---- compile_task_data 1 object, 80 bytes ---- article 2 objects, 80 bytes ---- list_together_routine 2 objects, 80 bytes - ---- build_methodology 1 object, 56 bytes ---- inter_warehouse 1 object, 56 bytes + ---- build_methodology 1 object, 56 bytes + ---- star_invention 1 object, 48 bytes ---- HTML_file_state 1 object, 48 bytes ---- figures_data 1 object, 48 bytes - ---- star_invention 1 object, 48 bytes ---- kind_template_definition 1 object, 40 bytes ---- by_routine_bp_data 1 object, 40 bytes - ---- parse_name_notice 1 object, 40 bytes ---- loop_over_scope 1 object, 40 bytes + ---- parse_name_notice 1 object, 40 bytes 37.5% was used for memory not allocated for objects: - 15.9% text stream storage 42248420 bytes in 265816 claims + 15.9% text stream storage 42248504 bytes in 265816 claims 3.5% dictionary storage 9278976 bytes in 16372 claims ---- sorting 1064 bytes in 3 claims 2.7% source text 7200000 bytes in 3 claims @@ -244,5 +244,5 @@ Total memory consumption was 258576K = 253 MB ---- emitter array storage 12320 bytes in 8 claims ---- code generation workspace for objects 9200 bytes in 9 claims -19.9% was overhead - 52765128 bytes = 51528K = 50 MB +19.9% was overhead - 52764376 bytes = 51527K = 50 MB diff --git a/inform7/Figures/preform-summary.txt b/inform7/Figures/preform-summary.txt index 1da67088e..d7fdfbb6f 100644 --- a/inform7/Figures/preform-summary.txt +++ b/inform7/Figures/preform-summary.txt @@ -3,9 +3,9 @@ (@1)=1 (hits 171/171) (matched: '100') constraint CS = {r0} extremes [1, 1] (@1)minus (@2)=1 - (hits 0/2000) constraint DS = {12} extremes [2, 2] + (hits 0/1998) constraint DS = {12} extremes [2, 2] (@1)=1 (@2)( (@3)=2 (@4)) - (hits 273/844) (matched: '"[current item from the multiple object list]: [run paragraph on]" ( a )') constraint DS = {12} extremes [4, 4] + (hits 273/840) (matched: '"[current item from the multiple object list]: [run paragraph on]" ( a )') constraint DS = {12} extremes [4, 4] (@1)=1 (hits 1564/5496) (matched: 'Represents geographical locations, both indoor and outdoor, which are not necessarily areas in a building. A player in one @@ -14,12 +14,12 @@ =1 (hits 11/9823) (matched: 'plus infinity') constraint (none) extremes [1, infinity) (@1)=1 - (hits 78/247) (matched: 'false') constraint CS = {6} extremes [1, 1] + (hits 78/298) (matched: 'false') constraint CS = {6} extremes [1, 1] =1 - (hits 0/1692) constraint DS = {8} extremes [2, infinity) + (hits 0/1470) constraint DS = {8} extremes [2, infinity) (@1)unicode =1 - (hits 0/4344) constraint DS = {12} extremes [2, infinity) + (hits 0/4350) constraint DS = {12} extremes [2, infinity) =1 - (hits 0/3572) constraint DW = {9, 10, 11} extremes [2, 5] + (hits 0/2983) constraint DW = {9, 10, 11} extremes [2, 5] =1 (hits 0/9734) constraint (none) extremes [1, infinity) diff --git a/inform7/Figures/timings-diagnostics.txt b/inform7/Figures/timings-diagnostics.txt index 0db0b1950..ed4cc92cd 100644 --- a/inform7/Figures/timings-diagnostics.txt +++ b/inform7/Figures/timings-diagnostics.txt @@ -1,15 +1,15 @@ 100.0% in inform7 run - 67.2% in compilation to Inter - 25.6% in //Phrases::Manager::compile_first_block// - 8.9% in //Phrases::Manager::compile_as_needed// - 6.8% in //Strings::compile_responses// - 5.9% in //InferenceSubjects::emit_all// - 4.4% in //MajorNodes::pre_pass// + 67.6% in compilation to Inter + 25.9% in //Phrases::Manager::compile_first_block// + 8.6% in //Phrases::Manager::compile_as_needed// + 7.2% in //Strings::compile_responses// + 6.2% in //InferenceSubjects::emit_all// + 4.2% in //MajorNodes::pre_pass// 3.3% in //MajorNodes::pass_1// 2.0% in //Phrases::Manager::RulePrintingRule_routine// - 1.8% in //Phrases::Manager::rulebooks_array// - 0.9% in //RTVerbs::ConjugateVerb// - 0.7% in //Phrases::Manager::traverse// + 2.0% in //Phrases::Manager::rulebooks_array// + 1.0% in //RTVerbs::ConjugateVerb// + 0.8% in //Phrases::Manager::traverse// 0.5% in //Phrases::Manager::parse_rule_parameters// 0.5% in //World::stage_V// 0.3% in //MajorNodes::pass_2// @@ -20,17 +20,18 @@ 0.1% in //Task::make_built_in_kind_constructors// 0.1% in //World::stages_II_and_III// 3.4% not specifically accounted for - 30.3% in running Inter pipeline - 10.0% in step preparation - 9.6% in inter step 2/12: link + 29.8% in running Inter pipeline + 9.9% in step preparation + 9.4% in inter step 2/12: link 7.0% in inter step 12/12: generate inform6 -> auto.inf 0.3% in inter step 9/12: make-identifiers-unique 0.1% in inter step 10/12: reconcile-verbs 0.1% in inter step 11/12: eliminate-redundant-labels + 0.1% in inter step 4/12: parse-linked-matter 0.1% in inter step 5/12: resolve-conditional-compilation 0.1% in inter step 6/12: assimilate 0.1% in inter step 7/12: resolve-external-symbols 0.1% in inter step 8/12: inspect-plugs - 2.0% not specifically accounted for - 2.0% in supervisor + 1.9% not specifically accounted for + 2.1% in supervisor 0.4% not specifically accounted for diff --git a/inform7/assertions-module/Chapter 4/Assertions.w b/inform7/assertions-module/Chapter 4/Assertions.w index d4580d387..975077bcf 100644 --- a/inform7/assertions-module/Chapter 4/Assertions.w +++ b/inform7/assertions-module/Chapter 4/Assertions.w @@ -1023,8 +1023,8 @@ in this case. @ = #ifdef IF_MODULE - if ((PL::MapDirections::get_mapping_relationship(px)) && - (PL::MapDirections::get_mapping_relationship(py))) { + if ((MapRelations::get_mapping_relationship(px)) && + (MapRelations::get_mapping_relationship(py))) { Map::enter_one_way_mode(); Assertions::make_coupling(px, py->down); Assertions::make_coupling(px->down, py); diff --git a/inform7/assertions-module/Chapter 4/Refine Parse Tree.w b/inform7/assertions-module/Chapter 4/Refine Parse Tree.w index e24a6f81e..daa8c9d0f 100644 --- a/inform7/assertions-module/Chapter 4/Refine Parse Tree.w +++ b/inform7/assertions-module/Chapter 4/Refine Parse Tree.w @@ -368,7 +368,7 @@ has the marble and the box as its children, the relationship being containment. if (p->down) { Refiner::refine(p->down, creation_rule); #ifdef IF_MODULE - instance *dir = PL::MapDirections::get_mapping_relationship(p); + instance *dir = MapRelations::get_mapping_relationship(p); if (dir) @; #endif if (p->down->next) Refiner::refine(p->down->next, creation_rule); diff --git a/inform7/assertions-module/Chapter 4/Relation Knowledge.w b/inform7/assertions-module/Chapter 4/Relation Knowledge.w index 9eb3d0585..f1f79e05b 100644 --- a/inform7/assertions-module/Chapter 4/Relation Knowledge.w +++ b/inform7/assertions-module/Chapter 4/Relation Knowledge.w @@ -22,7 +22,7 @@ void Assertions::Relational::assert_subtree_in_relationship(parse_node *value, p return; } #ifdef IF_MODULE - if (PL::MapDirections::get_mapping_relationship(relationship_subtree)) + if (MapRelations::get_mapping_relationship(relationship_subtree)) @; pronoun_usage *pro = Node::get_pronoun(relationship_subtree->down); if ((pro) && (pro->pronoun_used == here_pronoun)) diff --git a/inform7/core-module/Chapter 1/Class Predeclarations.w b/inform7/core-module/Chapter 1/Class Predeclarations.w index d7578e1ff..e43fbe321 100644 --- a/inform7/core-module/Chapter 1/Class Predeclarations.w +++ b/inform7/core-module/Chapter 1/Class Predeclarations.w @@ -217,18 +217,24 @@ DECLARE_CLASS(test_scenario) @ //index// -- +@e connected_submap_CLASS @e contents_entry_CLASS @e documentation_ref_CLASS +@e EPS_map_level_CLASS @e index_page_CLASS @e index_element_CLASS @e index_lexicon_entry_CLASS +@e rubric_holder_CLASS = +DECLARE_CLASS(connected_submap) DECLARE_CLASS(contents_entry) DECLARE_CLASS(documentation_ref) +DECLARE_CLASS(EPS_map_level) DECLARE_CLASS(index_element) DECLARE_CLASS(index_page) DECLARE_CLASS(index_lexicon_entry) +DECLARE_CLASS(rubric_holder) @ //if// -- @@ -236,9 +242,7 @@ DECLARE_CLASS(index_lexicon_entry) @e auxiliary_file_CLASS @e cached_understanding_CLASS @e command_index_entry_CLASS -@e connected_submap_CLASS @e direction_inference_data_CLASS -@e EPS_map_level_CLASS @e found_in_inference_data_CLASS @e grammar_line_CLASS @e grammar_verb_CLASS @@ -255,7 +259,6 @@ DECLARE_CLASS(index_lexicon_entry) @e regions_data_CLASS @e release_instructions_CLASS @e reserved_command_verb_CLASS -@e rubric_holder_CLASS @e scene_CLASS @e slash_gpr_CLASS @e spatial_data_CLASS @@ -272,9 +275,7 @@ DECLARE_CLASS(action_name) DECLARE_CLASS(auxiliary_file) DECLARE_CLASS(cached_understanding) DECLARE_CLASS(command_index_entry) -DECLARE_CLASS(connected_submap) DECLARE_CLASS(direction_inference_data) -DECLARE_CLASS(EPS_map_level) DECLARE_CLASS(found_in_inference_data) DECLARE_CLASS(grammar_line) DECLARE_CLASS(grammar_verb) @@ -291,7 +292,6 @@ DECLARE_CLASS(part_of_inference_data) DECLARE_CLASS(regions_data) DECLARE_CLASS(release_instructions) DECLARE_CLASS(reserved_command_verb) -DECLARE_CLASS(rubric_holder) DECLARE_CLASS(scene) DECLARE_CLASS(slash_gpr) DECLARE_CLASS(spatial_data) diff --git a/inform7/if-module/Chapter 1/IF Module.w b/inform7/if-module/Chapter 1/IF Module.w index e2f00e48a..73adeed7b 100644 --- a/inform7/if-module/Chapter 1/IF Module.w +++ b/inform7/if-module/Chapter 1/IF Module.w @@ -22,7 +22,7 @@ void IFModule::start(void) { ReleaseInstructions::start(); WherePredicates::start(); SpatialRelations::start(); - PL::MapDirections::start(); + MapRelations::start(); } @ @@ -84,12 +84,12 @@ void IFModule::create_plugins(void) { persons_plugin = PluginManager::new(&PL::Persons::start, I"persons", ifp); player_plugin = PluginManager::new(&Player::start, I"player", ifp); regions_plugin = PluginManager::new(&Regions::start, I"regions", ifp); - scenes_plugin = PluginManager::new(&PL::Scenes::start, I"scenes", ifp); - scoring_plugin = PluginManager::new(&PL::Score::start, I"scoring", ifp); - showme_plugin = PluginManager::new(&PL::Showme::start, I"showme", ifp); + scenes_plugin = PluginManager::new(&Scenes::start, I"scenes", ifp); + scoring_plugin = PluginManager::new(&TheScore::start, I"scoring", ifp); times_plugin = PluginManager::new(TimesOfDay::start, I"times of day", ifp); actions_plugin = PluginManager::new(&ActionsPlugin::start, I"actions", ifp); parsing_plugin = PluginManager::new(&ParsingPlugin::start, I"command", ifp); + showme_plugin = PluginManager::new(&RTShowmeCommand::start, I"showme", parsing_plugin); } diff --git a/inform7/if-module/Chapter 3/Devices.w b/inform7/if-module/Chapter 3/Devices.w index b47933f2f..5ff31f2ef 100644 --- a/inform7/if-module/Chapter 3/Devices.w +++ b/inform7/if-module/Chapter 3/Devices.w @@ -7,7 +7,7 @@ to things of the kind "device". This used to be accomplished by the Standard Rules in a clumsy sort of way (with a direct I6 code injection), but in the age of Inter we want to avoid that sort of tomfoolery. -@ = += void PL::Devices::start(void) { PluginManager::plug(NEW_BASE_KIND_NOTIFY_PLUG, PL::Devices::new_base_kind_notify); PluginManager::plug(COMPLETE_MODEL_PLUG, PL::Devices::IF_complete_model); diff --git a/inform7/if-module/Chapter 3/Map Connection Relations.w b/inform7/if-module/Chapter 3/Map Connection Relations.w index 2454ee822..8212b7014 100644 --- a/inform7/if-module/Chapter 3/Map Connection Relations.w +++ b/inform7/if-module/Chapter 3/Map Connection Relations.w @@ -1,4 +1,4 @@ -[PL::MapDirections::] Map Connection Relations. +[MapRelations::] Map Connection Relations. To define one binary predicate for each map direction, such as "mapped north of". @@ -14,12 +14,12 @@ Metro" tests the "mapped-north" BP. = bp_family *map_connecting_bp_family = NULL; -void PL::MapDirections::start(void) { +void MapRelations::start(void) { map_connecting_bp_family = BinaryPredicateFamilies::new(); - METHOD_ADD(map_connecting_bp_family, TYPECHECK_BPF_MTID, PL::MapDirections::typecheck); - METHOD_ADD(map_connecting_bp_family, ASSERT_BPF_MTID, PL::MapDirections::assert); + METHOD_ADD(map_connecting_bp_family, TYPECHECK_BPF_MTID, MapRelations::typecheck); + METHOD_ADD(map_connecting_bp_family, ASSERT_BPF_MTID, MapRelations::assert); METHOD_ADD(map_connecting_bp_family, DESCRIBE_FOR_INDEX_BPF_MTID, - PL::MapDirections::describe_for_index); + MapRelations::describe_for_index); } @h Subsequent creations. @@ -30,7 +30,7 @@ parse sentences are needed. In fact, however, directions are "noticed" at an earlier stage in Inform's run, so another two-step is needed: = -binary_predicate *PL::MapDirections::create_sketchy_mapping_direction(wording W) { +binary_predicate *MapRelations::create_sketchy_mapping_direction(wording W) { binary_predicate *bp; @; return bp; @@ -47,14 +47,14 @@ outside" instead of "mapped inside of" and "mapped outside of." This is done to avoid ambiguities with the already-existing meanings of inside and outside to do with spatial containment. -The use of the word "mapped" may seem itself off. Why define "to be mapped +The use of the word "mapped" may seem itself odd. Why define "to be mapped east of" rather than "to be east of"? After all, that seems to be what is used in assertions like: >> The Bakery is east of Pudding Lane. -In fact, the A-parser reads sentences like that by looking out specially for -direction names plus "of" -- so this is parsed without using the mapping +In fact, the assertion parser reads sentences like that by looking out specially +for direction names plus "of" -- so this is parsed without using the mapping predicate for "east". But it cannot read: >> The Flour Cellar is below the Bakery. @@ -62,11 +62,6 @@ predicate for "east". But it cannot read: as a direction name plus "of", since "below" is not the name of the direction "down", and anyway there is no "of". -We do not allow direction names with unexpected capital letters because we -want to allow room names to contain direction names on occasion: - ->> The fire hydrant is in West from 47th Street. - = ::= mapping ... @@ -135,7 +130,7 @@ makes it possible to complete the details of the BP. = int mmp_call_counter = 0; -void PL::MapDirections::make_mapped_predicate(instance *I) { +void MapRelations::make_mapped_predicate(instance *I) { wording W = Instances::get_name(I, FALSE); if ((Wordings::empty(W)) || (Wordings::length(W) > MAX_WORDS_IN_DIRECTION)) internal_error("bad direction name"); @@ -164,7 +159,7 @@ This won't catch everything, but it will do. Run-time checking will pick up remaining anomalies. = -int PL::MapDirections::typecheck(bp_family *self, binary_predicate *bp, +int MapRelations::typecheck(bp_family *self, binary_predicate *bp, kind **kinds_of_terms, kind **kinds_required, tc_problem_kit *tck) { int t; for (t=0; t<2; t++) @@ -186,10 +181,10 @@ explicitly given in the source text; and doors must always be specified as such. = -int PL::MapDirections::assert(bp_family *self, binary_predicate *bp, +int MapRelations::assert(bp_family *self, binary_predicate *bp, inference_subject *infs0, parse_node *spec0, inference_subject *infs1, parse_node *spec1) { - instance *o_dir = PL::MapDirections::get_mapping_direction(bp); + instance *o_dir = MapRelations::get_mapping_direction(bp); inference_subject *infs_from = infs0; inference_subject *infs_to = infs1; @@ -203,7 +198,7 @@ int PL::MapDirections::assert(bp_family *self, binary_predicate *bp, @h Indexing. = -void PL::MapDirections::describe_for_index(bp_family *self, OUTPUT_STREAM, +void MapRelations::describe_for_index(bp_family *self, OUTPUT_STREAM, binary_predicate *bp) { WRITE("map"); } @@ -212,12 +207,12 @@ void PL::MapDirections::describe_for_index(bp_family *self, OUTPUT_STREAM, Speed really does not matter here. = -binary_predicate *PL::MapDirections::get_mapping_relation(instance *dir) { +binary_predicate *MapRelations::get_mapping_relation(instance *dir) { if (dir == NULL) return NULL; return MAP_DATA(dir)->direction_relation; } -instance *PL::MapDirections::get_mapping_direction(binary_predicate *bp) { +instance *MapRelations::get_mapping_direction(binary_predicate *bp) { if (bp == NULL) return NULL; instance *I; LOOP_OVER_INSTANCES(I, K_object) @@ -226,12 +221,12 @@ instance *PL::MapDirections::get_mapping_direction(binary_predicate *bp) { return NULL; } -instance *PL::MapDirections::get_mapping_relationship(parse_node *p) { +instance *MapRelations::get_mapping_relationship(parse_node *p) { binary_predicate *bp = Node::get_relationship(p); if ((bp) && (PluginManager::active(map_plugin))) { - instance *dir = PL::MapDirections::get_mapping_direction( + instance *dir = MapRelations::get_mapping_direction( BinaryPredicates::get_reversal(bp)); - if (dir == NULL) dir = PL::MapDirections::get_mapping_direction(bp); + if (dir == NULL) dir = MapRelations::get_mapping_direction(bp); return dir; } return NULL; @@ -241,7 +236,7 @@ instance *PL::MapDirections::get_mapping_relationship(parse_node *p) { There is also one general relation built in, though it belongs to the spatial family: = -void PL::MapDirections::create_relations(void) { +void MapRelations::create_relations(void) { BinaryPredicates::make_pair(spatial_bp_family, BPTerms::new(infs_room), BPTerms::new(infs_room), diff --git a/inform7/if-module/Chapter 3/Scenes.w b/inform7/if-module/Chapter 3/Scenes.w index b0a145169..2618936ea 100644 --- a/inform7/if-module/Chapter 3/Scenes.w +++ b/inform7/if-module/Chapter 3/Scenes.w @@ -1,103 +1,34 @@ -[PL::Scenes::] Scenes. +[Scenes::] Scenes. -Scenes are periods of time during play: at any given moment, several -may be going on, or none. They are started and stopped when certain conditions -are met, or by virtue of having been anchored together. +A plugin to support named periods of time during an interactive story. -@ Scenes are gated intervals of time, but there are more than two gates: for -while there is only one past, there are many possible futures. These gates -are called "ends" in the code below, and are numbered end 0 (the beginning), -end 1 (the usual end), and then any named ends ("ends badly" or "ends -triumphantly", for instance, might be ends 2 and 3). Each end has a condition -which can cause it, or can be "anchored" to any number of ends of other -scenes -- to express which, the |scene_connector| structure is used. - -@d MAX_SCENE_ENDS 32 /* this must exceed 31 */ +@h Introduction. +Scenes are periods of time during play: at any given moment, several may be +going on, or none. They are started and stopped when certain conditions are +met, or by virtue of having been anchored together. All of this takes compiler +support: unlike most of the plugins in the if module, this one code-generates +to non-trivial functions as well as tables of data. = -typedef struct scene_connector { - struct scene *connect_to; /* scene connected to */ - int end; /* end number: see above */ - struct scene_connector *next; /* next in list of connectors for a scene end */ - struct parse_node *where_said; /* where this linkage was specified in source */ -} scene_connector; - -typedef struct scene { - struct instance *as_instance; /* the constant for the name of the scene */ - int once_only; /* cannot repeat during play */ - int start_of_play; /* if begins when play begins */ - int marker; /* used to detect potentially infinite recursion when scene changes occur */ - int no_ends; /* how many ends the scene has */ - struct wording end_names[MAX_SCENE_ENDS]; /* for ends 2, 3, ...: e.g. "badly" */ - struct rulebook *end_rulebook[MAX_SCENE_ENDS]; /* rules to apply then */ - struct parse_node *anchor_condition[MAX_SCENE_ENDS]; - struct scene_connector *anchor_scene[MAX_SCENE_ENDS]; /* linked list */ - int indexed; /* temporary storage during Scenes index creation */ - struct parse_node *scene_declared_at; /* where defined */ - struct parse_node *anchor_condition_set[MAX_SCENE_ENDS]; /* where set */ - CLASS_DEFINITION -} scene; - -@ - -@d scenes_data scene -@d SCENES_DATA(subj) PLUGIN_DATA_ON_SUBJECT(scenes, subj) - -@ The following either/or property needs some compiler support: - -= -property *P_recurring = NULL; - -@ And so does the one special scene: - -= -scene *SC_entire_game = NULL; - -@ Scenes are similarly numbered and stored in their own kind: -actually, they are for practical purposes a built-in enumeration kind. - -= (early code) -kind *K_scene = NULL; - -@ At run-time, we need to store information about the current state of each -scene: whether it is currently playing or not, when the last change occurred, -and so on. This data is stored in I6 arrays as follows: - -First, each scene has a unique ID number, used as an index |X| to these arrays. -This ID number is what is stored as an I6 value for the kind of value |scene|, -and it agrees with the allocation ID for the I7 scene structure. - -|scene_status-->X| is 0 if the scene is not playing, but may do so in future; -1 if the scene is playing; or 2 if the scene is not playing and will never -play again. - -|scene_started-->X| is the value of |the_time| when the scene last started, -or 0 if it has never started. - -|scene_ended-->X| is the value of |the_time| when the scene last ended, -or 0 if it has never ended. (The "starting" end does not count as ending -for this purpose.) - -|scene_endings-->X| is a bitmap recording which ends have been used, -including bit 1 which records whether the scene has started. - -|scene_latest_ending-->X| holds the end number of the most recent ending -(or 0 if the scene has never ended). - -@h Plugin calls. - -= -void PL::Scenes::start(void) { - PL::Scenes::declare_annotations(); - PL::Scenes::grant_annotation_permissions(); - PluginManager::plug(MAKE_SPECIAL_MEANINGS_PLUG, PL::Scenes::make_special_meanings); - PluginManager::plug(NEW_PROPERTY_NOTIFY_PLUG, PL::Scenes::scenes_new_property_notify); - PluginManager::plug(NEW_INSTANCE_NOTIFY_PLUG, PL::Scenes::scenes_new_named_instance_notify); - PluginManager::plug(NEW_BASE_KIND_NOTIFY_PLUG, PL::Scenes::scenes_new_base_kind_notify); - PluginManager::plug(PRODUCTION_LINE_PLUG, PL::Scenes::production_line); +void Scenes::start(void) { + Scenes::declare_annotations(); + PluginManager::plug(PRODUCTION_LINE_PLUG, Scenes::production_line); + PluginManager::plug(NEW_PROPERTY_NOTIFY_PLUG, Scenes::new_property_notify); + PluginManager::plug(NEW_INSTANCE_NOTIFY_PLUG, Scenes::new_named_instance_notify); + PluginManager::plug(NEW_BASE_KIND_NOTIFY_PLUG, Scenes::new_base_kind_notify); + PluginManager::plug(MAKE_SPECIAL_MEANINGS_PLUG, Scenes::make_special_meanings); } -@ And these annotations to the syntax tree: +int Scenes::production_line(int stage, int debugging, + stopwatch_timer *sequence_timer) { + if (stage == INTER1_CSEQ) { + BENCH(RTScenes::DetectSceneChange_routine); + BENCH(RTScenes::ShowSceneStatus_routine); + } + return FALSE; +} + +@ This plugin needs one extra syntax tree annotation: @e constant_scene_ANNOT /* |scene|: for constant values */ @@ -107,45 +38,47 @@ DECLARE_ANNOTATION_FUNCTIONS(constant_scene, scene) @ = MAKE_ANNOTATION_FUNCTIONS(constant_scene, scene) -@ = -void PL::Scenes::declare_annotations(void) { - Annotations::declare_type(constant_scene_ANNOT, PL::Scenes::write_constant_scene_ANNOT); +void Scenes::declare_annotations(void) { + Annotations::declare_type(constant_scene_ANNOT, Scenes::write_constant_scene_ANNOT); + Annotations::allow(CONSTANT_NT, constant_scene_ANNOT); } -void PL::Scenes::write_constant_scene_ANNOT(text_stream *OUT, parse_node *p) { +void Scenes::write_constant_scene_ANNOT(text_stream *OUT, parse_node *p) { if (Node::get_constant_scene(p)) WRITE(" {scene: %I}", Node::get_constant_scene(p)->as_instance); } -void PL::Scenes::grant_annotation_permissions(void) { - Annotations::allow(CONSTANT_NT, constant_scene_ANNOT); -} +@ Scenes are the instances of a built-in enumeration kind, created by a +Neptune file belonging to //WorldModelKit//, and this is recognised by its +Inter identifier |SCENE_TY|. += (early code) +kind *K_scene = NULL; -int PL::Scenes::production_line(int stage, int debugging, - stopwatch_timer *sequence_timer) { - if (stage == INTER1_CSEQ) { - BENCH(PL::Scenes::DetectSceneChange_routine); - BENCH(PL::Scenes::ShowSceneStatus_routine); - } - return FALSE; -} - -int PL::Scenes::make_special_meanings(void) { - SpecialMeanings::declare(PL::Scenes::begins_when_SMF, I"scene-begins-when", 1); - SpecialMeanings::declare(PL::Scenes::ends_when_SMF, I"scene-ends-when", 1); - return FALSE; -} - -@ To detect "scene" and "recurring": - -= -int PL::Scenes::scenes_new_base_kind_notify(kind *new_base, text_stream *name, wording W) { +@ = +int Scenes::new_base_kind_notify(kind *new_base, text_stream *name, wording W) { if (Str::eq_wide_string(name, L"SCENE_TY")) { K_scene = new_base; return TRUE; } return FALSE; } +@ //scene// structures are automatically created whenever a new instance of the +kind "scene" is created, and this is where that happens. + += +int Scenes::new_named_instance_notify(instance *I) { + if ((K_scene) && (Kinds::eq(Instances::to_kind(I), K_scene))) { + Scenes::new_scene(I); + return TRUE; + } + return FALSE; +} + +@ The following either/or property needs some compiler support: + += (early code) +property *P_recurring = NULL; + @ This is a property name to do with scenes which Inform provides special support for; it recognises the English name when it is defined by the Standard Rules. (So there is no need to translate this to other languages.) @@ -155,7 +88,7 @@ Standard Rules. (So there is no need to translate this to other languages.) recurring @ = -int PL::Scenes::scenes_new_property_notify(property *prn) { +int Scenes::new_property_notify(property *prn) { if ((prn->name)) { switch (<>) { case 0: P_recurring = prn; break; @@ -164,24 +97,64 @@ int PL::Scenes::scenes_new_property_notify(property *prn) { return FALSE; } -@ Scene structures are automatically created whenever a new instance of the -kind "scene" is created, and this is where that happens. +@h Conceptual model of scenes. +Scenes are gated intervals of time, but there are more than two gates: for +while there is only one past, there are many possible futures. These gates +are called "ends" in the code below, and are numbered end 0 (the beginning), +end 1 (the usual end), and then any named ends ("ends badly" or "ends +triumphantly", for instance, might be ends 2 and 3). Each end has a condition +which can cause it, or can be "anchored" to any number of ends of other +scenes -- to express which, the //scene_connector// structure is used. + +@d MAX_SCENE_ENDS 32 /* this must exceed 31 */ = -int PL::Scenes::scenes_new_named_instance_notify(instance *I) { - if ((K_scene) && (Kinds::eq(Instances::to_kind(I), K_scene))) { - PL::Scenes::new_scene(I); - return TRUE; - } - return FALSE; +typedef struct scene { + struct instance *as_instance; /* the constant for the name of the scene */ + int once_only; /* cannot repeat during play */ + int start_of_play; /* if begins when play begins */ + int marker; /* used to detect potentially infinite recursion when scene changes occur */ + int no_ends; /* how many ends the scene has */ + struct scene_end ends[MAX_SCENE_ENDS]; + int indexed; /* temporary storage during Scenes index creation */ + CLASS_DEFINITION +} scene; + +typedef struct scene_end { + struct wording end_names; /* for ends 2, 3, ...: e.g. "badly" */ + struct rulebook *end_rulebook; /* rules to apply then */ + struct parse_node *anchor_condition; + struct scene_connector *anchor_connectors; /* linked list */ + struct parse_node *anchor_condition_set; /* where set */ + CLASS_DEFINITION +} scene_end; + +typedef struct scene_connector { + struct scene *connect_to; /* scene connected to */ + int end; /* end number: see above */ + struct scene_connector *next; /* next in list of connectors for a scene end */ + struct parse_node *where_said; /* where this linkage was specified in source */ +} scene_connector; + +scene *SC_entire_game = NULL; + +wording Scenes::get_name(scene *sc) { + return Instances::get_name(sc->as_instance, FALSE); } +@ A plugin called |xyzzy| generally has a hunk of subject data called |xyzzy_data|, +so we would normally have a structure called |scenes_data|, but in fact that +structure is just going to be //scene//. So: + +@d scenes_data scene +@d SCENES_DATA(subj) PLUGIN_DATA_ON_SUBJECT(scenes, subj) + @h Scene structures. As we've seen, the following is called whenever a new instance of "scene" is created: = -void PL::Scenes::new_scene(instance *I) { +void Scenes::new_scene(instance *I) { scene *sc = CREATE(scene); @; @; @@ -194,12 +167,10 @@ void PL::Scenes::new_scene(instance *I) { sc->indexed = FALSE; sc->no_ends = 2; sc->start_of_play = FALSE; - sc->scene_declared_at = current_sentence; - int end; - for (end=0; endno_ends; end++) { - sc->anchor_condition[end] = NULL; - sc->anchor_scene[end] = NULL; - PL::Scenes::new_scene_rulebook(sc, end); + for (int end=0; endno_ends; end++) { + sc->ends[end].anchor_condition = NULL; + sc->ends[end].anchor_connectors = NULL; + Scenes::new_scene_rulebook(sc, end); } @ This is a scene name which Inform provides special support for; it recognises @@ -219,24 +190,19 @@ to translate this to other languages.) @ So we sometimes want to be able to get from an instance to its scene structure. = -scene *PL::Scenes::from_named_constant(instance *I) { +scene *Scenes::from_named_constant(instance *I) { if (K_scene == NULL) return NULL; kind *K = Instances::to_kind(I); if (Kinds::eq(K, K_scene)) return PLUGIN_DATA_ON_SUBJECT(scenes, I->as_subject); return NULL; } -wording PL::Scenes::get_name(scene *sc) { - return Instances::get_name(sc->as_instance, FALSE); -} - @h Creating and parsing ends. = -int PL::Scenes::parse_scene_end_name(scene *sc, wording EW, int create) { - int i; - for (i=2; ino_ends; i++) - if (Wordings::match(EW, sc->end_names[i])) +int Scenes::parse_scene_end_name(scene *sc, wording EW, int create) { + for (int i=2; ino_ends; i++) + if (Wordings::match(EW, sc->ends[i].end_names)) return i; if (create) { int end = sc->no_ends++; @@ -244,8 +210,8 @@ int PL::Scenes::parse_scene_end_name(scene *sc, wording EW, int create) { if (TargetVMs::is_16_bit(Task::vm())) max = 15; if (end >= max) @ else { - sc->end_names[end] = EW; - PL::Scenes::new_scene_rulebook(sc, end); + sc->ends[end].end_names = EW; + Scenes::new_scene_rulebook(sc, end); return end; } } @@ -264,14 +230,14 @@ int PL::Scenes::parse_scene_end_name(scene *sc, wording EW, int create) { @h Scene end rulebooks. = -void PL::Scenes::new_scene_rulebook(scene *sc, int end) { +void Scenes::new_scene_rulebook(scene *sc, int end) { wording RW = EMPTY_WORDING, AW = EMPTY_WORDING; @; rulebook *rb = Rulebooks::new_automatic(RW, K_action_name, NO_OUTCOME, FALSE, FALSE, FALSE, Hierarchy::local_package(RULEBOOKS_HAP)); Rulebooks::set_alt_name(rb, AW); - sc->end_rulebook[end] = rb; + sc->ends[end].end_rulebook = rb; if (end >= 2) @; } @@ -287,7 +253,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily". Feeds::feed_C_string_expanding_strings(L"when"); Feeds::feed_wording(NW); Feeds::feed_C_string_expanding_strings((end==0)?L"begins":L"ends"); - if (end >= 2) Feeds::feed_wording(sc->end_names[end]); + if (end >= 2) Feeds::feed_wording(sc->ends[end].end_names); RW = Feeds::end(id); id = Feeds::begin(); @@ -295,7 +261,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily". NW = Instances::get_name(sc->as_instance, FALSE); Feeds::feed_wording(NW); Feeds::feed_C_string_expanding_strings((end==0)?L"begins":L"ends"); - if (end >= 2) Feeds::feed_wording(sc->end_names[end]); + if (end >= 2) Feeds::feed_wording(sc->ends[end].end_names); AW = Feeds::end(id); @ = @@ -306,7 +272,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily". Feeds::feed_C_string_expanding_strings(L"To decide if (S - "); Feeds::feed_wording(NW); Feeds::feed_C_string_expanding_strings(L") ended "); - Feeds::feed_wording(sc->end_names[end]); + Feeds::feed_wording(sc->ends[end].end_names); Sentences::make_node(Task::syntax_tree(), Feeds::end(id), ':'); id = Feeds::begin(); @@ -320,7 +286,7 @@ ends merrily" and "when the Banquet Entertainment ends merrily". Feeds::feed_C_string_expanding_strings(L"To decide if (S - "); Feeds::feed_wording(NW); Feeds::feed_C_string_expanding_strings(L") did not end "); - Feeds::feed_wording(sc->end_names[end]); + Feeds::feed_wording(sc->ends[end].end_names); Sentences::make_node(Task::syntax_tree(), Feeds::end(id), ':'); id = Feeds::begin(); @@ -334,11 +300,19 @@ ends merrily" and "when the Banquet Entertainment ends merrily". @h Anchors. These are joins between the endings of different scenes, and there are two -assertion sentences to create them. This handles the special meaning "X -begins when...". +assertion sentences to create them: = -int PL::Scenes::begins_when_SMF(int task, parse_node *V, wording *NPs) { +int Scenes::make_special_meanings(void) { + SpecialMeanings::declare(Scenes::begins_when_SMF, I"scene-begins-when", 1); + SpecialMeanings::declare(Scenes::ends_when_SMF, I"scene-ends-when", 1); + return FALSE; +} + +@ This one handles the special meaning "X begins when...". + += +int Scenes::begins_when_SMF(int task, parse_node *V, wording *NPs) { wording SW = (NPs)?(NPs[0]):EMPTY_WORDING; wording OW = (NPs)?(NPs[1]):EMPTY_WORDING; switch (task) { /* "The Ballroom Scene begins when..." */ @@ -350,10 +324,10 @@ int PL::Scenes::begins_when_SMF(int task, parse_node *V, wording *NPs) { V->next->next = O; return TRUE; case PASS_1_SMFT: - PL::Scenes::new_scene_anchor(V, 1, 0); + Scenes::new_scene_anchor(V, 1, 0); break; case PASS_2_SMFT: - PL::Scenes::new_scene_anchor(V, 2, 0); + Scenes::new_scene_anchor(V, 2, 0); break; } return FALSE; @@ -363,7 +337,7 @@ int PL::Scenes::begins_when_SMF(int task, parse_node *V, wording *NPs) { two noun phrases and sometimes three. = -int PL::Scenes::ends_when_SMF(int task, parse_node *V, wording *NPs) { +int Scenes::ends_when_SMF(int task, parse_node *V, wording *NPs) { wording SW = (NPs)?(NPs[0]):EMPTY_WORDING; wording OW = (NPs)?(NPs[1]):EMPTY_WORDING; wording O2W = (NPs)?(NPs[2]):EMPTY_WORDING; @@ -382,16 +356,19 @@ int PL::Scenes::ends_when_SMF(int task, parse_node *V, wording *NPs) { } return TRUE; case PASS_1_SMFT: - PL::Scenes::new_scene_anchor(V, 1, 1); + Scenes::new_scene_anchor(V, 1, 1); break; case PASS_2_SMFT: - PL::Scenes::new_scene_anchor(V, 2, 1); + Scenes::new_scene_anchor(V, 2, 1); break; } return FALSE; } -@ = +@ This rather clumsy global variable is a convenience when parsing the +Preform grammar below. + += scene *scene_end_of_which_parsed = NULL; @ Sentences giving scene boundaries have a simple form: @@ -479,7 +456,7 @@ and also internally converts the result: @ = instance *I = <>; if (Instances::of_kind(I, K_scene) == FALSE) return FALSE; - scene_end_of_which_parsed = PL::Scenes::from_named_constant(I); + scene_end_of_which_parsed = Scenes::from_named_constant(I); ==> { -, scene_end_of_which_parsed }; @ Lastly, scene end names are parsed by these internals. They are identical @@ -488,14 +465,14 @@ never fails. = internal { - int end = PL::Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, FALSE); + int end = Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, FALSE); if (end < 0) { ==> { fail nonterminal }; } ==> { end, - }; return TRUE; } internal { - int end = PL::Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, TRUE); + int end = Scenes::parse_scene_end_name(scene_end_of_which_parsed, W, TRUE); ==> { end, - }; return TRUE; } @@ -508,7 +485,7 @@ we will call "the Ballroom Dance begins" this end, and "the Hallway Greeting ends" the other end. = -void PL::Scenes::new_scene_anchor(parse_node *p, int phase, int given_end) { +void Scenes::new_scene_anchor(parse_node *p, int phase, int given_end) { scene *this_scene = NULL; /* scene whose end is being caused: must be set */ int end = -1; /* end which is being anchored: must be set */ @@ -533,7 +510,8 @@ void PL::Scenes::new_scene_anchor(parse_node *p, int phase, int given_end) { if (phase == 2) { @; if ((this_scene == SC_entire_game) && (external_condition == NULL)) { - StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_EntireGameHardwired), + StandardProblems::sentence_problem(Task::syntax_tree(), + _p_(PM_EntireGameHardwired), "the special 'Entire Game' scene cannot have its start or end modified", "because it is a built-in scene designed to be going on whenever there " "is play going on in the story."); @@ -551,24 +529,25 @@ void PL::Scenes::new_scene_anchor(parse_node *p, int phase, int given_end) { this_scene->start_of_play = TRUE; @ = - if (this_scene->anchor_condition[end]) - StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ScenesOversetEnd), + if (this_scene->ends[end].anchor_condition) + StandardProblems::sentence_problem(Task::syntax_tree(), + _p_(PM_ScenesOversetEnd), "you have already told me a condition for when that happens", "and although a scene can be linked to the beginning or ending " "of any number of other scenes, it can only have a single " "condition such as 'when the player is in the Dining Car' " "to trigger it from outside the scene machinery."); - this_scene->anchor_condition[end] = external_condition; - this_scene->anchor_condition_set[end] = current_sentence; + this_scene->ends[end].anchor_condition = external_condition; + this_scene->ends[end].anchor_condition_set = current_sentence; @ = scene_connector *scon = CREATE(scene_connector); scon->connect_to = other_scene; scon->end = other_end; scon->where_said = current_sentence; - scon->next = this_scene->anchor_scene[end]; - this_scene->anchor_scene[end] = scon; + scon->next = this_scene->ends[end].anchor_connectors; + this_scene->ends[end].anchor_connectors = scon; @ = (SW); @@ -592,571 +571,11 @@ void PL::Scenes::new_scene_anchor(parse_node *p, int phase, int given_end) { } } else external_condition = Specifications::new_UNKNOWN(CW); -@h Scene-changing machinery at run-time. -So what are scenes for? Well, they have two uses. One is that the end rulebooks -are run when ends occur, which is a convenient way to time events. The -following generates the necessary code to (a) detect when a scene end occurs, -and (b) act upon it. This is all handled by the following I6 routine. - -There is one argument, |chs|: the number of iterations so far. Iterations occur -because each set of scene changes could change the circumstances in such a -way that other scene changes are now required (through external conditions, -not through anchors); we don't want this to lock up, so we will cap recursion. -Within the routine, a second local variable, |ch|, is a flag indicating -whether any change in status has or has not occurred. - -There is no significance to the return value. - -@d MAX_SCENE_CHANGE_ITERATION 20 - -= -void PL::Scenes::DetectSceneChange_routine(void) { - inter_name *iname = Hierarchy::find(DETECTSCENECHANGE_HL); - packaging_state save = Routines::begin(iname); - inter_symbol *chs_s = LocalVariables::add_internal_local_c_as_symbol(I"chs", "count of changes made"); - inter_symbol *ch_s = LocalVariables::add_internal_local_c_as_symbol(I"ch", "flag: change made"); - inter_symbol *CScene_l = Produce::reserve_label(Emit::tree(), I".CScene"); - - scene *sc; - LOOP_OVER(sc, scene) @; - - Produce::place_label(Emit::tree(), CScene_l); - @; - - Routines::end(save); - Hierarchy::make_available(Emit::tree(), iname); -} - -@ = - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), GT_BIP); - Produce::down(Emit::tree()); - Produce::val_symbol(Emit::tree(), K_value, chs_s); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) MAX_SCENE_CHANGE_ITERATION); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), PRINT_BIP); - Produce::down(Emit::tree()); - Produce::val_text(Emit::tree(), I">--> The scene change machinery is stuck.\n"); - Produce::up(Emit::tree()); - Produce::rtrue(Emit::tree()); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), GT_BIP); - Produce::down(Emit::tree()); - Produce::val_symbol(Emit::tree(), K_value, ch_s); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - Produce::inv_call_iname(Emit::tree(), iname); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), PREINCREMENT_BIP); - Produce::down(Emit::tree()); - Produce::ref_symbol(Emit::tree(), K_value, chs_s); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - - Produce::rfalse(Emit::tree()); - -@ Recall that ends numbered 1, 2, 3, ... are all ways for the scene to end, -so they are only checked if its status is currently running; end 0 is the -beginning, checked only if it isn't. We give priority to the higher end -numbers so that more abstruse ways to end take precedence over less. - -@ = - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), EQ_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - for (int end=sc->no_ends-1; end>=1; end--) - PL::Scenes::test_scene_end(sc, end, ch_s, CScene_l); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), EQ_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - PL::Scenes::test_scene_end(sc, 0, ch_s, CScene_l); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - -@ Individual ends are tested here. There are actually three ways an end can -occur: at start of play (for end 0 only), when an I7 condition holds, or when -another end to which it is anchored also ends. But we only check the first -two, because the third way will be taken care of by the consequences code -below. - -= -void PL::Scenes::test_scene_end(scene *sc, int end, inter_symbol *ch_s, inter_symbol *CScene_l) { - if ((end == 0) && (sc->start_of_play)) { - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), EQ_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), BITWISEAND_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_ENDINGS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - PL::Scenes::compile_scene_end(sc, 0); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - } - parse_node *S = sc->anchor_condition[end]; - if (S) { - @; - @; - } -} - -@ = - current_sentence = sc->anchor_condition_set[end]; - if (Node::is(S, UNKNOWN_NT)) { - if ((Node::get_text(S))) S = <>; - sc->anchor_condition[end] = S; - } - if (Node::is(S, UNKNOWN_NT)) { - LOG("Condition: $P\n", S); - StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ScenesBadCondition), - "'begins when' and 'ends when' must be followed by a condition", - "which this does not seem to be, or else 'when play begins', " - "'when play ends', 'when S begins', or 'when S ends', where " - "S is the name of any scene."); - return; - } - - if (Dash::check_condition(S) == FALSE) return; - -@ If the condition holds, we set the change flag |ch| and abort the search -through scenes by jumping past the run of tests. (We can't compile a break -instruction because we're not compiling a loop.) - -@ = - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - current_sentence = sc->anchor_condition_set[end]; - Specifications::Compiler::emit_as_val(K_truth_state, S); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), STORE_BIP); - Produce::down(Emit::tree()); - Produce::ref_symbol(Emit::tree(), K_value, ch_s); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); - Produce::up(Emit::tree()); - PL::Scenes::compile_scene_end(sc, end); - Produce::inv_primitive(Emit::tree(), JUMP_BIP); - Produce::down(Emit::tree()); - Produce::lab(Emit::tree(), CScene_l); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - -@ That's everything except for the consequences of a scene end occurring. -Code for that is generated here. - -Because one end can cause another, given anchoring, we must guard against -compiler hangs when the source text calls for infinite recursion (since -this would cause us to generate infinitely long code). So the |marker| flags -are used to mark which scenes have already been ended in code generated -for this purpose. - -= -void PL::Scenes::compile_scene_end(scene *sc, int end) { - scene *sc2; - LOOP_OVER(sc2, scene) sc2->marker = 0; - PL::Scenes::compile_scene_end_dash(sc, end); -} - -@ The semantics of scene ending are trickier than they look, because of the -fact that "Ballroom Dance ends merrily" (say, end number 3) is in some -sense a specialisation of "Ballroom Dance ends" (1). The doctrine is that -end 3 causes end 1 to happen first, because a special ending is also a -general ending; but rules taking effect on end 3 come earlier than -those for end 1, because they're more specialised, so they have a right to -take effect first. - -= -void PL::Scenes::compile_scene_end_dash(scene *sc, int end) { - int ix = sc->allocation_id; - sc->marker++; - if (end >= 2) { - int e = end; end = 1; - @; - @; - @; - end = e; - } - @; - @; - @ - @; - @; - - if (end >= 2) { - int e = end; end = 1; - @; - @; - end = e; - } -} - -@ If the scene has the "recurring" either/or property, then any of the -"ends" endings will fail to reset its status. (This doesn't mean that no -end actually occurred.) - -@ = - if (end == 0) { - Produce::inv_primitive(Emit::tree(), STORE_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); - Produce::up(Emit::tree()); - } else { - Produce::inv_primitive(Emit::tree(), IFELSE_BIP); - Produce::down(Emit::tree()); - inter_name *iname = Hierarchy::find(GPROPERTY_HL); - Produce::inv_call_iname(Emit::tree(), iname); - Produce::down(Emit::tree()); - RTKinds::emit_weak_id_as_val(K_scene); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) ix+1); - Produce::val_iname(Emit::tree(), K_value, RTProperties::iname(P_recurring)); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), STORE_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), STORE_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 2); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - } - -@ = - if (end == 0) { - Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL)); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(WHEN_SCENE_BEGINS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->allocation_id + 1)); - Produce::up(Emit::tree()); - } - Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL)); - Produce::down(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->end_rulebook[end]->allocation_id)); - Produce::up(Emit::tree()); - if (end == 1) { - Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL)); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(WHEN_SCENE_ENDS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->allocation_id + 1)); - Produce::up(Emit::tree()); - } - -@ = - inter_name *sarr = Hierarchy::find(SCENE_ENDED_HL); - if (end == 0) sarr = Hierarchy::find(SCENE_STARTED_HL); - Produce::inv_primitive(Emit::tree(), STORE_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, sarr); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val_iname(Emit::tree(), K_number, Hierarchy::find(THE_TIME_HL)); - Produce::up(Emit::tree()); - - Produce::inv_primitive(Emit::tree(), STORE_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_ENDINGS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::inv_primitive(Emit::tree(), BITWISEOR_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_ENDINGS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (1 << end)); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - - Produce::inv_primitive(Emit::tree(), STORE_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_LATEST_ENDING_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_value, LITERAL_IVAL, (inter_ti) end); - Produce::up(Emit::tree()); - -@ = - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(DEBUG_SCENES_HL)); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - TEMPORARY_TEXT(OUT) - WRITE("[Scene '"); - if (sc->as_instance) WRITE("%+W", Instances::get_name(sc->as_instance, FALSE)); - WRITE("' "); - if (end == 0) WRITE("begins"); else WRITE("ends"); - if (end >= 2) WRITE(" %+W", sc->end_names[end]); - WRITE("]\n"); - Produce::inv_primitive(Emit::tree(), PRINT_BIP); - Produce::down(Emit::tree()); - Produce::val_text(Emit::tree(), OUT); - Produce::up(Emit::tree()); - DISCARD_TEXT(OUT) - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - -@ In general, the marker count is used to ensure that |PL::Scenes::compile_scene_end_dash| -never calls itself for a scene it has been called with before on this round. -This prevents Inform locking up generating infinite amounts of code. However, -one exception is allowed, in very limited circumstances. Suppose we want to -make a scene recur, but only if it ends in a particular way. Then we might -type: - ->> Brisk Quadrille begins when Brisk Quadrille ends untidily. - -This is allowed; it's a case where the "tolerance" below is raised. - -@ = - scene *other_scene; - LOOP_OVER(other_scene, scene) { - int tolerance = 1; - if (sc == other_scene) tolerance = sc->no_ends; - if (other_scene->marker < tolerance) { - int other_end; - for (other_end = 0; other_end < other_scene->no_ends; other_end++) { - scene_connector *scon; - for (scon = other_scene->anchor_scene[other_end]; scon; scon = scon->next) { - if ((scon->connect_to == sc) && (scon->end == end)) { - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), EQ_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) other_scene->allocation_id); - Produce::up(Emit::tree()); - if (other_end >= 1) - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); - else - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - PL::Scenes::compile_scene_end_dash(other_scene, other_end); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - } - } - } - } - } - -@h More SCENES output. -As we've seen, when the SCENES command has been typed, Inform prints a notice -out at run-time when any scene end occurs. It also prints a run-down of the -scene status at the moment the command is typed, and the following code is -what handles this. - -= -void PL::Scenes::ShowSceneStatus_routine(void) { - inter_name *iname = Hierarchy::find(SHOWSCENESTATUS_HL); - packaging_state save = Routines::begin(iname); - Produce::inv_primitive(Emit::tree(), IFDEBUG_BIP); - Produce::down(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - scene *sc; - LOOP_OVER(sc, scene) { - wording NW = Instances::get_name(sc->as_instance, FALSE); - - Produce::inv_primitive(Emit::tree(), IFELSE_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), EQ_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - @; - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - @; - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - } - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - Routines::end(save); - Hierarchy::make_available(Emit::tree(), iname); -} - -@ = - TEMPORARY_TEXT(T) - WRITE_TO(T, "Scene '%+W' playing (for ", NW); - Produce::inv_primitive(Emit::tree(), PRINT_BIP); - Produce::down(Emit::tree()); - Produce::val_text(Emit::tree(), T); - Produce::up(Emit::tree()); - DISCARD_TEXT(T) - - Produce::inv_primitive(Emit::tree(), PRINTNUMBER_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), MINUS_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_number, Hierarchy::find(THE_TIME_HL)); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STARTED_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - - Produce::inv_primitive(Emit::tree(), PRINT_BIP); - Produce::down(Emit::tree()); - Produce::val_text(Emit::tree(), I" mins now)\n"); - Produce::up(Emit::tree()); - -@ = - Produce::inv_primitive(Emit::tree(), IF_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), GT_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_LATEST_ENDING_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - @; - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - -@ = - TEMPORARY_TEXT(T) - WRITE_TO(T, "Scene '%+W' ended", NW); - Produce::inv_primitive(Emit::tree(), PRINT_BIP); - Produce::down(Emit::tree()); - Produce::val_text(Emit::tree(), T); - Produce::up(Emit::tree()); - DISCARD_TEXT(T) - - if (sc->no_ends > 2) { - Produce::inv_primitive(Emit::tree(), SWITCH_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_LATEST_ENDING_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - for (int end=2; endno_ends; end++) { - Produce::inv_primitive(Emit::tree(), CASE_BIP); - Produce::down(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) end); - Produce::code(Emit::tree()); - Produce::down(Emit::tree()); - TEMPORARY_TEXT(T) - WRITE_TO(T, " %+W", sc->end_names[end]); - Produce::inv_primitive(Emit::tree(), PRINT_BIP); - Produce::down(Emit::tree()); - Produce::val_text(Emit::tree(), T); - Produce::up(Emit::tree()); - DISCARD_TEXT(T) - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - } - Produce::up(Emit::tree()); - Produce::up(Emit::tree()); - } - - Produce::inv_primitive(Emit::tree(), PRINT_BIP); - Produce::down(Emit::tree()); - Produce::val_text(Emit::tree(), I"\n"); - Produce::up(Emit::tree()); - -@h During clauses. -We've now seen one use of scenes: they kick off rulebooks when they begin or -end. The other use for them is to predicate rules on whether they are currently -playing or not, using a "during" clause. - -We allow these either to name a specific scene, or to describe a collection -of them: +@ One use of scenes is to kick off rulebooks when they begin or end. The other +use for them is to predicate rules on whether they are currently playing or +not, using a "during" clause, and this is used when parsing those in rule +headers. Note that a match here can name a specific scene, or describe a +collection of them: = ::= @@ -1171,48 +590,3 @@ of them: (Kinds::eq(Specifications::to_kind(spec), K_scene)))) { ==> { -, spec }; } else return FALSE; - -@ And this is where we compile I6 code to test that a scene matching this is -actually running: - -= -void PL::Scenes::emit_during_clause(parse_node *spec) { - int stuck = TRUE; - if (K_scene == NULL) { Produce::val(Emit::tree(), K_truth_state, LITERAL_IVAL, 1); return; } - if (Rvalues::is_rvalue(spec)) { - Dash::check_value(spec, K_scene); - instance *I = Rvalues::to_instance(spec); - if (Instances::of_kind(I, K_scene)) { - scene *sc = PL::Scenes::from_named_constant(I); - Produce::inv_primitive(Emit::tree(), EQ_BIP); - Produce::down(Emit::tree()); - Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); - Produce::down(Emit::tree()); - Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); - Produce::up(Emit::tree()); - Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); - Produce::up(Emit::tree()); - stuck = FALSE; - } - } else { - if (Dash::check_value(spec, Kinds::unary_con(CON_description, K_scene)) == ALWAYS_MATCH) { - parse_node *desc = Descriptions::to_rvalue(spec); - if (desc) { - Produce::inv_call_iname(Emit::tree(), Hierarchy::find(DURINGSCENEMATCHING_HL)); - Produce::down(Emit::tree()); - Specifications::Compiler::emit_as_val(K_value, desc); - Produce::up(Emit::tree()); - stuck = FALSE; - } - } - } - if (stuck) { - Produce::val(Emit::tree(), K_truth_state, LITERAL_IVAL, 1); - StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ScenesBadDuring), - "'during' must be followed by the name of a scene or of a " - "description which applies to a single scene", - "such as 'during Station Arrival' or 'during a recurring scene'."); - return; - } -} diff --git a/inform7/if-module/Chapter 3/Spatial Relations.w b/inform7/if-module/Chapter 3/Spatial Relations.w index cbed4b1c0..2c3a17052 100644 --- a/inform7/if-module/Chapter 3/Spatial Relations.w +++ b/inform7/if-module/Chapter 3/Spatial Relations.w @@ -35,7 +35,7 @@ void SpatialRelations::stock(bp_family *self, int n) { if (n == 1) { @; @; - PL::MapDirections::create_relations(); + MapRelations::create_relations(); Regions::create_relations(); } } diff --git a/inform7/if-module/Chapter 3/The Map.w b/inform7/if-module/Chapter 3/The Map.w index 75bcea74f..4c4928e06 100644 --- a/inform7/if-module/Chapter 3/The Map.w +++ b/inform7/if-module/Chapter 3/The Map.w @@ -41,7 +41,7 @@ int Map::production_line(int stage, int debugging, stopwatch_timer *sequence_tim } @ This special sentence is used as a hint in making map documents; it has no -effect on the world model itself, and so is dealt with elsewhere, in //EPS Map//. +effect on the world model itself, and so is dealt with elsewhere, in //index: EPS Map//. = int Map::make_special_meanings(void) { @@ -75,7 +75,7 @@ int Map::look_for_direction_creation(parse_node *pn) { return FALSE; } direction_relations_noticed[no_directions_noticed] = - PL::MapDirections::create_sketchy_mapping_direction(Node::get_text(pn)); + MapRelations::create_sketchy_mapping_direction(Node::get_text(pn)); directions_noticed[no_directions_noticed++] = pn; return FALSE; } @@ -86,7 +86,7 @@ in connection with the "mapped D of" relations, it's altogether easier and makes for more legible code if we use a special inference family of our own: = (early code) -inference_family *direction_inf = NULL; /* 100; where do map connections from O lead? */ +inference_family *direction_inf = NULL; /* where do map connections from O lead? */ @ = void Map::create_inference(void) { @@ -322,7 +322,7 @@ int Map::set_kind_notify(instance *I, kind *k) { registered_directions++; inter_name *dname = RTMap::new_direction_iname(); MAP_DATA(I)->direction_iname = dname; - PL::MapDirections::make_mapped_predicate(I); + MapRelations::make_mapped_predicate(I); @h Map data on instances. We will use quite a lot of temporary work-space to put all of this together, @@ -452,8 +452,8 @@ noted above are keys into these arrays. It might look a little wasteful of I7's memory to expand the direction inferences, a nicely compact representation, into large and sparse arrays. But it's convenient, and profiling suggests that the memory overhead is not -significant. It also means that the //Spatial Map// mapping code, which contains -quite crunchy algorithms, has the fastest possible access to the layout. +significant. It also means that the //index: Spatial Map// mapping code, which +contains quite crunchy algorithms, has the fastest possible access to the layout. @d MAP_EXIT(X, Y) MAP_DATA(X)->exits[Y] @@ -665,7 +665,7 @@ void Map::connect(inference_subject *i_from, inference_subject *i_to, void Map::oneway_map_connection(instance *go_from, instance *go_to, instance *forwards_dir, int certainty_level) { - binary_predicate *bp = PL::MapDirections::get_mapping_relation(forwards_dir); + binary_predicate *bp = MapRelations::get_mapping_relation(forwards_dir); if (bp == NULL) internal_error("map connection in non-direction"); int x = prevailing_mood; prevailing_mood = certainty_level; diff --git a/inform7/if-module/Chapter 3/The Score.w b/inform7/if-module/Chapter 3/The Score.w index 6a9d37f3b..eb844028e 100644 --- a/inform7/if-module/Chapter 3/The Score.w +++ b/inform7/if-module/Chapter 3/The Score.w @@ -1,24 +1,28 @@ -[PL::Score::] The Score. +[TheScore::] The Score. -A plugin to support the maximum score variable. +A plugin to support the score variables. -@h Initialisation. +@ At one time, all interactive fiction had a scoring system, because that's +what computers did for our entertainment: they rewarded us with points. Having +its distant roots in that period, Inform handles a numerical score with just +a little compiler support, and this is where. = -void PL::Score::start(void) { - PluginManager::plug(PRODUCTION_LINE_PLUG, PL::Score::production_line); - PluginManager::plug(NEW_VARIABLE_NOTIFY_PLUG, PL::Score::new_variable_notify); +void TheScore::start(void) { + PluginManager::plug(PRODUCTION_LINE_PLUG, TheScore::production_line); + PluginManager::plug(NEW_VARIABLE_NOTIFY_PLUG, TheScore::new_variable_notify); } -int PL::Score::production_line(int stage, int debugging, stopwatch_timer *sequence_timer) { +int TheScore::production_line(int stage, int debugging, stopwatch_timer *sequence_timer) { if (stage == INTER1_CSEQ) { - BENCH(PL::Score::compile_max_score); + BENCH(TheScore::max_score_and_ranking_table); } return FALSE; } -@ For many years this was a defined I6 constant, but then people sent in bug -reports asking why it wouldn't change in play. +@ For many years "maximum score" was compiled to a constant, but then people sent +in bug reports asking why it wouldn't change in play. "Score", of course, is +more evidently variable. = (early code) nonlocal_variable *score_VAR = NULL; @@ -29,8 +33,13 @@ nonlocal_variable *max_score_VAR = NULL; score | maximum score -@ = -int PL::Score::new_variable_notify(nonlocal_variable *var) { +@ These are marked "initialisable" because of the way they are implemented at +run-time, using special variables in //WorldModelKit// rather than being +storage allocated by I7. Variables stored that way would not ordinarily be +possible to give values to in I7 assertions; but these are. + += +int TheScore::new_variable_notify(nonlocal_variable *var) { if ((var->name)) { switch(<>) { case 0: @@ -46,57 +55,38 @@ int PL::Score::new_variable_notify(nonlocal_variable *var) { return FALSE; } -@h The maximum score and rankings table. -A special rule is that if a table is called "Rankings" and contains a column +@ A special rule is that if a table is called "Rankings" and contains a column of numbers followed by a column of text, then it is used by the run-time scoring system. In retrospect, Inform really shouldn't support this at the -compiler level (not that it does much), and in any case it's a very old-school -idea of IF. Still, it does little harm. +compiler level (not that it does much), but it does little harm. = ::= rankings -@ This can only happen if we declare it somehow in I6 code, which -we do with the constant |RANKING_TABLE|. We also set the |MAX_SCORE| variable -equal to the number in the bottom row of the table, which is assumed to be the -score corresponding to successful completion and the highest rank. +@ Nothing will happen unless a table has both this magic name, and also the +right shape: two columns, number then text. If so, the maximum score is +initialised to the number in the final row of the table, which is assumed to +be the score corresponding to successful completion and the highest rank. + +The test case |Cooking|, an example from the documentation, tests this. = -void PL::Score::compile_max_score(void) { - int rt_made = FALSE; - table *t; - LOOP_OVER(t, table) { +void TheScore::max_score_and_ranking_table(void) { + table *t, *ranking_table = NULL; + LOOP_OVER(t, table) if (((t->table_name_text)) && (Tables::get_no_columns(t) >= 2) && (Kinds::eq(Tables::kind_of_ith_column(t, 0), K_number)) && - (Kinds::eq(Tables::kind_of_ith_column(t, 1), K_text))) { - inter_name *iname = Hierarchy::find(RANKING_TABLE_HL); - Emit::named_iname_constant(iname, K_value, RTTables::identifier(t)); - parse_node *PN = Tables::cells_in_ith_column(t, 0); - while ((PN != NULL) && (PN->next != NULL)) PN = PN->next; - if ((PN != NULL) && (max_score_VAR) && - (VariableSubjects::has_initial_value_set(max_score_VAR) == FALSE)) - Assertions::PropertyKnowledge::initialise_global_variable( - max_score_VAR, Node::get_evaluation(PN)); - Hierarchy::make_available(Emit::tree(), iname); - global_compilation_settings.ranking_table_given = TRUE; - rt_made = TRUE; - break; - } - } - if (rt_made == FALSE) { - inter_name *iname = Hierarchy::find(RANKING_TABLE_HL); - Emit::named_generic_constant(iname, LITERAL_IVAL, 0); - Hierarchy::make_available(Emit::tree(), iname); - } - inter_name *iname = Hierarchy::find(INITIAL_MAX_SCORE_HL); - Hierarchy::make_available(Emit::tree(), iname); - if (VariableSubjects::has_initial_value_set(max_score_VAR)) { - inter_ti v1 = 0, v2 = 0; - RTVariables::seek_initial_value(iname, &v1, &v2, max_score_VAR); - Emit::named_generic_constant(iname, v1, v2); - } else { - Emit::named_numeric_constant(iname, 0); + (Kinds::eq(Tables::kind_of_ith_column(t, 1), K_text))) + ranking_table = t; + if (ranking_table) { + parse_node *PN = Tables::cells_in_ith_column(ranking_table, 0); + while ((PN != NULL) && (PN->next != NULL)) PN = PN->next; + if ((PN != NULL) && (max_score_VAR) && + (VariableSubjects::has_initial_value_set(max_score_VAR) == FALSE)) + Assertions::PropertyKnowledge::initialise_global_variable( + max_score_VAR, Node::get_evaluation(PN)); } + RTTheScore::support(ranking_table); } diff --git a/inform7/if-module/Contents.w b/inform7/if-module/Contents.w index 08b99301a..fd0011e31 100644 --- a/inform7/if-module/Contents.w +++ b/inform7/if-module/Contents.w @@ -32,13 +32,7 @@ fiction, which provides for geography, spatial containment and scenes." Regions The Map Map Connection Relations - Spatial Geometry - Spatial Map - HTML Map - EPS Map - Showme Command Scenes - Temporal Map The Score Chapter 4: Actions diff --git a/inform7/imperative-module/Chapter 2/Rules.w b/inform7/imperative-module/Chapter 2/Rules.w index 8ca1fa850..cd984aedc 100644 --- a/inform7/imperative-module/Chapter 2/Rules.w +++ b/inform7/imperative-module/Chapter 2/Rules.w @@ -744,7 +744,7 @@ int Rules::index(OUTPUT_STREAM, rule *R, rulebook *owner, rule_context rc) { #ifdef IF_MODULE if (rc.scene_context) { WRITE(" during "); - wording SW = PL::Scenes::get_name(rc.scene_context); + wording SW = Scenes::get_name(rc.scene_context); WRITE("%+W", SW); } #endif diff --git a/inform7/imperative-module/Chapter 3/Phrase Runtime Context Data.w b/inform7/imperative-module/Chapter 3/Phrase Runtime Context Data.w index 0425faa45..355e2ea74 100644 --- a/inform7/imperative-module/Chapter 3/Phrase Runtime Context Data.w +++ b/inform7/imperative-module/Chapter 3/Phrase Runtime Context Data.w @@ -137,7 +137,7 @@ scene *Phrases::Context::get_scene(ph_runtime_context_data *phrcd) { if (phrcd == NULL) return NULL; if (Rvalues::is_rvalue(phrcd->during_scene)) { instance *q = Rvalues::to_instance(phrcd->during_scene); - if (q) return PL::Scenes::from_named_constant(q); + if (q) return Scenes::from_named_constant(q); } return NULL; } @@ -377,7 +377,7 @@ void Phrases::Context::compile_test_tail(phrase *ph, applicability_condition *ac @ = Produce::inv_primitive(Emit::tree(), IFELSE_BIP); Produce::down(Emit::tree()); - PL::Scenes::emit_during_clause(phrcd->during_scene); + RTScenes::emit_during_clause(phrcd->during_scene); Produce::code(Emit::tree()); Produce::down(Emit::tree()); diff --git a/inform7/index-module/Chapter 2/Index File Services.w b/inform7/index-module/Chapter 2/Index File Services.w index bccc2f0d3..b44fc6875 100644 --- a/inform7/index-module/Chapter 2/Index File Services.w +++ b/inform7/index-module/Chapter 2/Index File Services.w @@ -644,7 +644,7 @@ void Index::index_actual_element(OUTPUT_STREAM, text_stream *elt) { if (Str::eq_wide_string(elt, L"Pl")) { #ifdef IF_MODULE - PL::Scenes::Index::index(OUT); + IXScenes::index(OUT); #endif return; } @@ -654,7 +654,7 @@ void Index::index_actual_element(OUTPUT_STREAM, text_stream *elt) { } if (Str::eq_wide_string(elt, L"RS")) { #ifdef IF_MODULE - PL::Scenes::Index::index_rules(OUT); + IXScenes::index_rules(OUT); #endif return; } diff --git a/inform7/if-module/Chapter 3/Temporal Map.w b/inform7/index-module/Chapter 3/Scenes.w similarity index 69% rename from inform7/if-module/Chapter 3/Temporal Map.w rename to inform7/index-module/Chapter 3/Scenes.w index 8decc962d..6cc394310 100644 --- a/inform7/if-module/Chapter 3/Temporal Map.w +++ b/inform7/index-module/Chapter 3/Scenes.w @@ -1,4 +1,4 @@ -[PL::Scenes::Index::] Temporal Map. +[IXScenes::] Scenes. Parallel to the World index of space is the Scenes index of time, and in this section we render it as HTML. @@ -11,7 +11,7 @@ with a notation which takes a little bit of on-screen explanation, but seems natural enough to learn in practice. = -void PL::Scenes::Index::index(OUTPUT_STREAM) { +void IXScenes::index(OUTPUT_STREAM) { int nr = NUMBER_CREATED(scene); scene **sorted = Memory::calloc(nr, sizeof(scene *), INDEX_SORTING_MREASON); @; @@ -23,7 +23,7 @@ void PL::Scenes::Index::index(OUTPUT_STREAM) { Memory::I7_array_free(sorted, INDEX_SORTING_MREASON, nr, sizeof(scene *)); } -void PL::Scenes::Index::index_rules(OUTPUT_STREAM) { +void IXScenes::index_rules(OUTPUT_STREAM) { Rulebooks::index_scene(OUT); /* rules in generic scene-ending rulebooks */ @; } @@ -34,7 +34,7 @@ void PL::Scenes::Index::index_rules(OUTPUT_STREAM) { int i = 0; scene *sc; LOOP_OVER(sc, scene) sorted[i++] = sc; - qsort(sorted, (size_t) nr, sizeof(scene *), PL::Scenes::Index::compare_scenes); + qsort(sorted, (size_t) nr, sizeof(scene *), IXScenes::compare_scenes); @ The sorted ordering is used as-is later on, when we get to the details, but for the tabulation it's refined further. First we have the start-of-play @@ -45,39 +45,38 @@ third category is usually empty except for scenes the author has forgotten about and created but never made use of.) @ = - int i; - for (i=0; istart_of_play) || (sc == SC_entire_game)) - PL::Scenes::Index::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr); + IXScenes::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr); } - for (i=0; ianchor_condition[0]) && (sc != SC_entire_game)) - PL::Scenes::Index::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr); + if ((sc->ends[0].anchor_condition) && (sc != SC_entire_game)) + IXScenes::index_from_scene(OUT, sc, 0, START_OF_PLAY_END, NULL, sorted, nr); } - for (i=0; iindexed == FALSE) - PL::Scenes::Index::index_from_scene(OUT, sc, 0, NEVER_HAPPENS_END, NULL, sorted, nr); + IXScenes::index_from_scene(OUT, sc, 0, NEVER_HAPPENS_END, NULL, sorted, nr); } @ = HTML_OPEN("p"); WRITE("Legend: "); - PL::Scenes::Index::scene_icon_legend(OUT, "WPB", "Begins when play begins"); + IXScenes::scene_icon_legend(OUT, "WPB", "Begins when play begins"); WRITE("; "); - PL::Scenes::Index::scene_icon_legend(OUT, "WhenC", "can begin whenever some condition holds"); + IXScenes::scene_icon_legend(OUT, "WhenC", "can begin whenever some condition holds"); WRITE("; "); - PL::Scenes::Index::scene_icon_legend(OUT, "Segue", "follows when a previous scene ends"); + IXScenes::scene_icon_legend(OUT, "Segue", "follows when a previous scene ends"); WRITE("; "); - PL::Scenes::Index::scene_icon_legend(OUT, "Simul", "begins simultaneously"); + IXScenes::scene_icon_legend(OUT, "Simul", "begins simultaneously"); WRITE("; "); - PL::Scenes::Index::scene_icon_legend(OUT, "WNever", "never begins"); + IXScenes::scene_icon_legend(OUT, "WNever", "never begins"); WRITE("; "); - PL::Scenes::Index::scene_icon_legend(OUT, "ENever", "never ends"); + IXScenes::scene_icon_legend(OUT, "ENever", "never ends"); WRITE("; "); - PL::Scenes::Index::scene_icon_legend(OUT, "Recurring", "recurring (can happen more than once)"); + IXScenes::scene_icon_legend(OUT, "Recurring", "recurring (can happen more than once)"); WRITE(". Scene names are italicised when and if they appear for a second " "or subsequent time because the scene can begin in more than one way."); HTML_CLOSE("p"); @@ -94,8 +93,7 @@ about and created but never made use of.) @ = Index::anchor(OUT, I"SDETAILS"); - int i; - for (i=0; i; @@ -109,10 +107,9 @@ fact, end. @; if (sc == SC_entire_game) @; - int end; - for (end=0; endno_ends; end++) { + for (int end=0; endno_ends; end++) { if ((end == 1) && (sc->no_ends > 2) && - (sc->anchor_condition[1]==NULL) && (sc->anchor_scene[1]==NULL)) + (sc->ends[1].anchor_condition==NULL) && (sc->ends[1].anchor_connectors==NULL)) continue; @; @; @@ -122,8 +119,8 @@ fact, end. @ = HTML::open_indented_p(OUT, 1, "hanging"); Index::anchor_numbered(OUT, sc->allocation_id); - WRITE("The %+W scene", PL::Scenes::get_name(sc)); - Index::link(OUT, Wordings::first_wn(Node::get_text(sc->scene_declared_at))); + WRITE("The %+W scene", Scenes::get_name(sc)); + Index::link(OUT, Wordings::first_wn(Node::get_text(Instances::get_creating_sentence(sc->as_instance)))); if (PropertyInferences::either_or_state( Instances::as_subject(sc->as_instance), P_recurring) > 0) WRITE("  recurring"); @@ -156,7 +153,7 @@ fact, end. @ = HTML::open_indented_p(OUT, 1, "hanging"); WRITE("%s ", (end==0)?"Begins":"Ends"); - if (end >= 2) WRITE("%+W ", sc->end_names[end]); + if (end >= 2) WRITE("%+W ", sc->ends[end].end_names); WRITE("when: "); int count = 0; @; @@ -176,36 +173,35 @@ fact, end. } @ = - if (sc->anchor_condition[end]) { + if (sc->ends[end].anchor_condition) { if (count > 0) { HTML_TAG("br"); WRITE("or when: "); } - WRITE("%+W", Node::get_text(sc->anchor_condition[end])); - Index::link(OUT, Wordings::first_wn(Node::get_text(sc->anchor_condition_set[end]))); + WRITE("%+W", Node::get_text(sc->ends[end].anchor_condition)); + Index::link(OUT, Wordings::first_wn(Node::get_text(sc->ends[end].anchor_condition_set))); count++; } @ = - scene_connector *scon; - for (scon = sc->anchor_scene[end]; scon; scon=scon->next) { + for (scene_connector *scon = sc->ends[end].anchor_connectors; scon; scon=scon->next) { if (count > 0) { HTML_TAG("br"); WRITE("or when: "); } wording NW = Instances::get_name(scon->connect_to->as_instance, FALSE); WRITE("%+W %s", NW, (scon->end==0)?"begins":"ends"); - if (scon->end >= 2) WRITE(" %+W", scon->connect_to->end_names[scon->end]); + if (scon->end >= 2) WRITE(" %+W", scon->connect_to->ends[scon->end].end_names); Index::link(OUT, Wordings::first_wn(Node::get_text(scon->where_said))); count++; } @ = - if (Rulebooks::is_empty(sc->end_rulebook[end], Rulebooks::no_rule_context()) == FALSE) { + if (Rulebooks::is_empty(sc->ends[end].end_rulebook, Rulebooks::no_rule_context()) == FALSE) { HTML::open_indented_p(OUT, 1, "hanging"); WRITE("What happens:"); HTML_CLOSE("p"); int ignore_me = 0; - Rulebooks::index(OUT, sc->end_rulebook[end], "", Rulebooks::no_rule_context(), &ignore_me); + Rulebooks::index(OUT, sc->ends[end].end_rulebook, "", Rulebooks::no_rule_context(), &ignore_me); } @h Table of Scenes. @@ -224,7 +220,7 @@ on the initial call when |depth| is 0. @d NEVER_HAPPENS_END -2 = -void PL::Scenes::Index::index_from_scene(OUTPUT_STREAM, scene *sc, int depth, +void IXScenes::index_from_scene(OUTPUT_STREAM, scene *sc, int depth, int end, scene *sc_from, scene **sorted, int nr) { HTML::open_indented_p(OUT, depth+1, "tight"); @; @@ -241,18 +237,18 @@ void PL::Scenes::Index::index_from_scene(OUTPUT_STREAM, scene *sc, int depth, @ = switch(end) { - case 0: PL::Scenes::Index::scene_icon(OUT, "Simul"); break; - case 1: PL::Scenes::Index::scene_icon(OUT, "Segue"); break; + case 0: IXScenes::scene_icon(OUT, "Simul"); break; + case 1: IXScenes::scene_icon(OUT, "Segue"); break; case START_OF_PLAY_END: break; - case NEVER_HAPPENS_END: PL::Scenes::Index::scene_icon(OUT, "WNever"); break; + case NEVER_HAPPENS_END: IXScenes::scene_icon(OUT, "WNever"); break; default: - PL::Scenes::Index::scene_icon(OUT, "Segue"); - WRITE("[ends %+W] ", sc_from->end_names[end]); break; + IXScenes::scene_icon(OUT, "Segue"); + WRITE("[ends %+W] ", sc_from->ends[end].end_names); break; } if ((sc->indexed == FALSE) || (depth == 0)) { - if (sc == SC_entire_game) PL::Scenes::Index::scene_icon(OUT, "WPB"); - else if (sc->anchor_condition[0]) PL::Scenes::Index::scene_icon(OUT, "WhenC"); - if (sc->start_of_play) PL::Scenes::Index::scene_icon(OUT, "WPB"); + if (sc == SC_entire_game) IXScenes::scene_icon(OUT, "WPB"); + else if (sc->ends[0].anchor_condition) IXScenes::scene_icon(OUT, "WhenC"); + if (sc->start_of_play) IXScenes::scene_icon(OUT, "WPB"); } @ = @@ -262,17 +258,17 @@ void PL::Scenes::Index::index_from_scene(OUTPUT_STREAM, scene *sc, int depth, else Index::below_link_numbered(OUT, sc->allocation_id); @ = - int ways_to_end = 0, e; - for (e=1; eno_ends; e++) { - if (sc->anchor_scene[e]) ways_to_end++; - if (sc->anchor_condition[e]) ways_to_end++; + int ways_to_end = 0; + for (int e=1; eno_ends; e++) { + if (sc->ends[e].anchor_connectors) ways_to_end++; + if (sc->ends[e].anchor_condition) ways_to_end++; } - if (ways_to_end == 0) PL::Scenes::Index::scene_icon_append(OUT, "ENever"); + if (ways_to_end == 0) IXScenes::scene_icon_append(OUT, "ENever"); @ = inference_subject *subj = Instances::as_subject(sc->as_instance); if (PropertyInferences::either_or_state(subj, P_recurring) > UNKNOWN_CE) - PL::Scenes::Index::scene_icon_append(OUT, "Recurring"); + IXScenes::scene_icon_append(OUT, "Recurring"); @ And this is where the routine recurses, so that consequent scenes are tabulated underneath the present one, indented one step further in (since @@ -280,38 +276,37 @@ indentation is coupled to |depth|). First we recurse to scenes which end when this one does; then to scenes which begin when this one ends. @ = - int i; - for (i=0; ianchor_scene[0]; scon; scon=scon->next) + for (scon = sc2->ends[0].anchor_connectors; scon; scon=scon->next) if ((scon->connect_to == sc) && (scon->end >= 1)) - PL::Scenes::Index::index_from_scene(OUT, sc2, depth + 1, scon->end, sc, sorted, nr); + IXScenes::index_from_scene(OUT, sc2, depth + 1, scon->end, sc, sorted, nr); } - for (i=0; ianchor_scene[0]; scon; scon=scon->next) + for (scon = sc2->ends[0].anchor_connectors; scon; scon=scon->next) if ((scon->connect_to == sc) && (scon->end == 0)) - PL::Scenes::Index::index_from_scene(OUT, sc2, depth, scon->end, sc, sorted, nr); + IXScenes::index_from_scene(OUT, sc2, depth, scon->end, sc, sorted, nr); } @ We have been using: = -void PL::Scenes::Index::scene_icon(OUTPUT_STREAM, char *si) { - PL::Scenes::Index::scene_icon_unspaced(OUT, si); WRITE("  "); +void IXScenes::scene_icon(OUTPUT_STREAM, char *si) { + IXScenes::scene_icon_unspaced(OUT, si); WRITE("  "); } -void PL::Scenes::Index::scene_icon_append(OUTPUT_STREAM, char *si) { - WRITE("  "); PL::Scenes::Index::scene_icon_unspaced(OUT, si); +void IXScenes::scene_icon_append(OUTPUT_STREAM, char *si) { + WRITE("  "); IXScenes::scene_icon_unspaced(OUT, si); } -void PL::Scenes::Index::scene_icon_legend(OUTPUT_STREAM, char *si, char *gloss) { - PL::Scenes::Index::scene_icon_unspaced(OUT, si); WRITE(" %s", gloss); +void IXScenes::scene_icon_legend(OUTPUT_STREAM, char *si, char *gloss) { + IXScenes::scene_icon_unspaced(OUT, si); WRITE(" %s", gloss); } -void PL::Scenes::Index::scene_icon_unspaced(OUTPUT_STREAM, char *si) { +void IXScenes::scene_icon_unspaced(OUTPUT_STREAM, char *si) { HTML_TAG_WITH("img", "border=0 src=inform:/scene_icons/%s.png", si); } @@ -320,7 +315,7 @@ their indexing order. The Entire Game always comes first, and then come the rest in ascending alphabetical order. = -int PL::Scenes::Index::compare_scenes(const void *ent1, const void *ent2) { +int IXScenes::compare_scenes(const void *ent1, const void *ent2) { const scene *sc1 = *((const scene **) ent1); const scene *sc2 = *((const scene **) ent2); if ((sc1 == SC_entire_game) && (sc2 != SC_entire_game)) return -1; diff --git a/inform7/if-module/Chapter 3/EPS Map.w b/inform7/index-module/Chapter 4/EPS Map.w similarity index 100% rename from inform7/if-module/Chapter 3/EPS Map.w rename to inform7/index-module/Chapter 4/EPS Map.w diff --git a/inform7/if-module/Chapter 3/HTML Map.w b/inform7/index-module/Chapter 4/HTML Map.w similarity index 100% rename from inform7/if-module/Chapter 3/HTML Map.w rename to inform7/index-module/Chapter 4/HTML Map.w diff --git a/inform7/if-module/Chapter 3/Spatial Geometry.w b/inform7/index-module/Chapter 4/Spatial Geometry.w similarity index 100% rename from inform7/if-module/Chapter 3/Spatial Geometry.w rename to inform7/index-module/Chapter 4/Spatial Geometry.w diff --git a/inform7/if-module/Chapter 3/Spatial Map.w b/inform7/index-module/Chapter 4/Spatial Map.w similarity index 100% rename from inform7/if-module/Chapter 3/Spatial Map.w rename to inform7/index-module/Chapter 4/Spatial Map.w diff --git a/inform7/index-module/Contents.w b/inform7/index-module/Contents.w index 9dd9903c1..4e03f1e35 100644 --- a/inform7/index-module/Contents.w +++ b/inform7/index-module/Contents.w @@ -32,3 +32,10 @@ Chapter 3: Indexing for Plugins Backdrops Regions The Map + Scenes + +Chapter 4: Visualising Space + Spatial Geometry + Spatial Map + HTML Map + EPS Map diff --git a/inform7/runtime-module/Chapter 5/Scenes.w b/inform7/runtime-module/Chapter 5/Scenes.w new file mode 100644 index 000000000..0a13f492c --- /dev/null +++ b/inform7/runtime-module/Chapter 5/Scenes.w @@ -0,0 +1,641 @@ +[RTScenes::] Scenes. + +Compiling code to manage scene changes at run-time. + +@ At run-time, we need to store information about the current state of each +scene: whether it is currently playing or not, when the last change occurred, +and so on. This data is stored in I6 arrays as follows: + +First, each scene has a unique ID number, used as an index |X| to these arrays. +This ID number is what is stored as an I6 value for the kind of value |scene|, +and it agrees with the allocation ID for the I7 scene structure. + +|scene_status-->X| is 0 if the scene is not playing, but may do so in future; +1 if the scene is playing; or 2 if the scene is not playing and will never +play again. + +|scene_started-->X| is the value of |the_time| when the scene last started, +or 0 if it has never started. + +|scene_ended-->X| is the value of |the_time| when the scene last ended, +or 0 if it has never ended. (The "starting" end does not count as ending +for this purpose.) + +|scene_endings-->X| is a bitmap recording which ends have been used, +including bit 1 which records whether the scene has started. + +|scene_latest_ending-->X| holds the end number of the most recent ending +(or 0 if the scene has never ended). + +@h Scene-changing machinery at run-time. +So what are scenes for? Well, they have two uses. One is that the end +rulebooks are run when ends occur, which is a convenient way to time events. +The following generates the necessary code to (a) detect when a scene end +occurs, and (b) act upon it. This is all handled by the following Inter +function. + +There is one argument, |chs|: the number of iterations so far. Iterations +occur because each set of scene changes could change the circumstances in such +a way that other scene changes are now required (through external conditions, +not through anchors); we don't want this to lock up, so we will cap recursion. +Within the routine, a second local variable, |ch|, is a flag indicating +whether any change in status has or has not occurred. + +There is no significance to the return value. + +@d MAX_SCENE_CHANGE_ITERATION 20 + += +void RTScenes::DetectSceneChange_routine(void) { + inter_name *iname = Hierarchy::find(DETECTSCENECHANGE_HL); + packaging_state save = Routines::begin(iname); + inter_symbol *chs_s = + LocalVariables::add_internal_local_c_as_symbol(I"chs", "count of changes made"); + inter_symbol *ch_s = + LocalVariables::add_internal_local_c_as_symbol(I"ch", "flag: change made"); + inter_symbol *CScene_l = Produce::reserve_label(Emit::tree(), I".CScene"); + + scene *sc; + LOOP_OVER(sc, scene) @; + + Produce::place_label(Emit::tree(), CScene_l); + @; + + Routines::end(save); + Hierarchy::make_available(Emit::tree(), iname); +} + +@ = + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), GT_BIP); + Produce::down(Emit::tree()); + Produce::val_symbol(Emit::tree(), K_value, chs_s); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, + (inter_ti) MAX_SCENE_CHANGE_ITERATION); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), PRINT_BIP); + Produce::down(Emit::tree()); + Produce::val_text(Emit::tree(), I">--> The scene change machinery is stuck.\n"); + Produce::up(Emit::tree()); + Produce::rtrue(Emit::tree()); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), GT_BIP); + Produce::down(Emit::tree()); + Produce::val_symbol(Emit::tree(), K_value, ch_s); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + Produce::inv_call_iname(Emit::tree(), iname); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), PREINCREMENT_BIP); + Produce::down(Emit::tree()); + Produce::ref_symbol(Emit::tree(), K_value, chs_s); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + + Produce::rfalse(Emit::tree()); + +@ Recall that ends numbered 1, 2, 3, ... are all ways for the scene to end, +so they are only checked if its status is currently running; end 0 is the +beginning, checked only if it isn't. We give priority to the higher end +numbers so that more abstruse ways to end take precedence over less. + +@ = + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), EQ_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + for (int end=sc->no_ends-1; end>=1; end--) + RTScenes::test_scene_end(sc, end, ch_s, CScene_l); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), EQ_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + RTScenes::test_scene_end(sc, 0, ch_s, CScene_l); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + +@ Individual ends are tested here. There are actually three ways an end can +occur: at start of play (for end 0 only), when an I7 condition holds, or when +another end to which it is anchored also ends. But we only check the first +two, because the third way will be taken care of by the consequences code +below. + += +void RTScenes::test_scene_end(scene *sc, int end, inter_symbol *ch_s, inter_symbol *CScene_l) { + if ((end == 0) && (sc->start_of_play)) { + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), EQ_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), BITWISEAND_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_ENDINGS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + RTScenes::compile_scene_end(sc, 0); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + } + parse_node *S = sc->ends[end].anchor_condition; + if (S) { + @; + @; + } +} + +@ = + current_sentence = sc->ends[end].anchor_condition_set; + if (Node::is(S, UNKNOWN_NT)) { + if ((Node::get_text(S))) S = <>; + sc->ends[end].anchor_condition = S; + } + if (Node::is(S, UNKNOWN_NT)) { + LOG("Condition: $P\n", S); + StandardProblems::sentence_problem(Task::syntax_tree(), _p_(PM_ScenesBadCondition), + "'begins when' and 'ends when' must be followed by a condition", + "which this does not seem to be, or else 'when play begins', " + "'when play ends', 'when S begins', or 'when S ends', where " + "S is the name of any scene."); + return; + } + + if (Dash::check_condition(S) == FALSE) return; + +@ If the condition holds, we set the change flag |ch| and abort the search +through scenes by jumping past the run of tests. (We can't compile a break +instruction because we're not compiling a loop.) + +@ = + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + current_sentence = sc->ends[end].anchor_condition_set; + Specifications::Compiler::emit_as_val(K_truth_state, S); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), STORE_BIP); + Produce::down(Emit::tree()); + Produce::ref_symbol(Emit::tree(), K_value, ch_s); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); + Produce::up(Emit::tree()); + RTScenes::compile_scene_end(sc, end); + Produce::inv_primitive(Emit::tree(), JUMP_BIP); + Produce::down(Emit::tree()); + Produce::lab(Emit::tree(), CScene_l); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + +@ That's everything except for the consequences of a scene end occurring. +Code for that is generated here. + +Because one end can cause another, given anchoring, we must guard against +compiler hangs when the source text calls for infinite recursion (since +this would cause us to generate infinitely long code). So the |marker| flags +are used to mark which scenes have already been ended in code generated +for this purpose. + += +void RTScenes::compile_scene_end(scene *sc, int end) { + scene *sc2; + LOOP_OVER(sc2, scene) sc2->marker = 0; + RTScenes::compile_scene_end_dash(sc, end); +} + +@ The semantics of scene ending are trickier than they look, because of the +fact that "Ballroom Dance ends merrily" (say, end number 3) is in some +sense a specialisation of "Ballroom Dance ends" (1). The doctrine is that +end 3 causes end 1 to happen first, because a special ending is also a +general ending; but rules taking effect on end 3 come earlier than +those for end 1, because they're more specialised, so they have a right to +take effect first. + += +void RTScenes::compile_scene_end_dash(scene *sc, int end) { + int ix = sc->allocation_id; + sc->marker++; + if (end >= 2) { + int e = end; end = 1; + @; + @; + @; + end = e; + } + @; + @; + @ + @; + @; + + if (end >= 2) { + int e = end; end = 1; + @; + @; + end = e; + } +} + +@ If the scene has the "recurring" either/or property, then any of the +"ends" endings will fail to reset its status. (This doesn't mean that no +end actually occurred.) + +@ = + if (end == 0) { + Produce::inv_primitive(Emit::tree(), STORE_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); + Produce::up(Emit::tree()); + } else { + Produce::inv_primitive(Emit::tree(), IFELSE_BIP); + Produce::down(Emit::tree()); + inter_name *iname = Hierarchy::find(GPROPERTY_HL); + Produce::inv_call_iname(Emit::tree(), iname); + Produce::down(Emit::tree()); + RTKinds::emit_weak_id_as_val(K_scene); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) ix+1); + Produce::val_iname(Emit::tree(), K_value, RTProperties::iname(P_recurring)); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), STORE_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), STORE_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 2); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + } + +@ = + if (end == 0) { + Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL)); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(WHEN_SCENE_BEGINS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->allocation_id + 1)); + Produce::up(Emit::tree()); + } + Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL)); + Produce::down(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->ends[end].end_rulebook->allocation_id)); + Produce::up(Emit::tree()); + if (end == 1) { + Produce::inv_call_iname(Emit::tree(), Hierarchy::find(FOLLOWRULEBOOK_HL)); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(WHEN_SCENE_ENDS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (sc->allocation_id + 1)); + Produce::up(Emit::tree()); + } + +@ = + inter_name *sarr = Hierarchy::find(SCENE_ENDED_HL); + if (end == 0) sarr = Hierarchy::find(SCENE_STARTED_HL); + Produce::inv_primitive(Emit::tree(), STORE_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, sarr); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val_iname(Emit::tree(), K_number, Hierarchy::find(THE_TIME_HL)); + Produce::up(Emit::tree()); + + Produce::inv_primitive(Emit::tree(), STORE_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_ENDINGS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::inv_primitive(Emit::tree(), BITWISEOR_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_ENDINGS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) (1 << end)); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + + Produce::inv_primitive(Emit::tree(), STORE_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUPREF_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_LATEST_ENDING_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_value, LITERAL_IVAL, (inter_ti) end); + Produce::up(Emit::tree()); + +@ = + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(DEBUG_SCENES_HL)); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + TEMPORARY_TEXT(OUT) + WRITE("[Scene '"); + if (sc->as_instance) WRITE("%+W", Instances::get_name(sc->as_instance, FALSE)); + WRITE("' "); + if (end == 0) WRITE("begins"); else WRITE("ends"); + if (end >= 2) WRITE(" %+W", sc->ends[end].end_names); + WRITE("]\n"); + Produce::inv_primitive(Emit::tree(), PRINT_BIP); + Produce::down(Emit::tree()); + Produce::val_text(Emit::tree(), OUT); + Produce::up(Emit::tree()); + DISCARD_TEXT(OUT) + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + +@ In general, the marker count is used to ensure that |RTScenes::compile_scene_end_dash| +never calls itself for a scene it has been called with before on this round. +This prevents Inform locking up generating infinite amounts of code. However, +one exception is allowed, in very limited circumstances. Suppose we want to +make a scene recur, but only if it ends in a particular way. Then we might +type: + +>> Brisk Quadrille begins when Brisk Quadrille ends untidily. + +This is allowed; it's a case where the "tolerance" below is raised. + +@ = + scene *other_scene; + LOOP_OVER(other_scene, scene) { + int tolerance = 1; + if (sc == other_scene) tolerance = sc->no_ends; + if (other_scene->marker < tolerance) { + int other_end; + for (other_end = 0; other_end < other_scene->no_ends; other_end++) { + scene_connector *scon; + for (scon = other_scene->ends[other_end].anchor_connectors; scon; scon = scon->next) { + if ((scon->connect_to == sc) && (scon->end == end)) { + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), EQ_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) other_scene->allocation_id); + Produce::up(Emit::tree()); + if (other_end >= 1) + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); + else + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + RTScenes::compile_scene_end_dash(other_scene, other_end); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + } + } + } + } + } + +@h More SCENES output. +As we've seen, when the SCENES command has been typed, Inform prints a notice +out at run-time when any scene end occurs. It also prints a run-down of the +scene status at the moment the command is typed, and the following code is +what handles this. + += +void RTScenes::ShowSceneStatus_routine(void) { + inter_name *iname = Hierarchy::find(SHOWSCENESTATUS_HL); + packaging_state save = Routines::begin(iname); + Produce::inv_primitive(Emit::tree(), IFDEBUG_BIP); + Produce::down(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + scene *sc; + LOOP_OVER(sc, scene) { + wording NW = Instances::get_name(sc->as_instance, FALSE); + + Produce::inv_primitive(Emit::tree(), IFELSE_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), EQ_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + @; + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + @; + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + } + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + Routines::end(save); + Hierarchy::make_available(Emit::tree(), iname); +} + +@ = + TEMPORARY_TEXT(T) + WRITE_TO(T, "Scene '%+W' playing (for ", NW); + Produce::inv_primitive(Emit::tree(), PRINT_BIP); + Produce::down(Emit::tree()); + Produce::val_text(Emit::tree(), T); + Produce::up(Emit::tree()); + DISCARD_TEXT(T) + + Produce::inv_primitive(Emit::tree(), PRINTNUMBER_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), MINUS_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_number, Hierarchy::find(THE_TIME_HL)); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_STARTED_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + + Produce::inv_primitive(Emit::tree(), PRINT_BIP); + Produce::down(Emit::tree()); + Produce::val_text(Emit::tree(), I" mins now)\n"); + Produce::up(Emit::tree()); + +@ = + Produce::inv_primitive(Emit::tree(), IF_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), GT_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_LATEST_ENDING_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 0); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + @; + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + +@ = + TEMPORARY_TEXT(T) + WRITE_TO(T, "Scene '%+W' ended", NW); + Produce::inv_primitive(Emit::tree(), PRINT_BIP); + Produce::down(Emit::tree()); + Produce::val_text(Emit::tree(), T); + Produce::up(Emit::tree()); + DISCARD_TEXT(T) + + if (sc->no_ends > 2) { + Produce::inv_primitive(Emit::tree(), SWITCH_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_object, Hierarchy::find(SCENE_LATEST_ENDING_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + for (int end=2; endno_ends; end++) { + Produce::inv_primitive(Emit::tree(), CASE_BIP); + Produce::down(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) end); + Produce::code(Emit::tree()); + Produce::down(Emit::tree()); + TEMPORARY_TEXT(T) + WRITE_TO(T, " %+W", sc->ends[end].end_names); + Produce::inv_primitive(Emit::tree(), PRINT_BIP); + Produce::down(Emit::tree()); + Produce::val_text(Emit::tree(), T); + Produce::up(Emit::tree()); + DISCARD_TEXT(T) + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + } + Produce::up(Emit::tree()); + Produce::up(Emit::tree()); + } + + Produce::inv_primitive(Emit::tree(), PRINT_BIP); + Produce::down(Emit::tree()); + Produce::val_text(Emit::tree(), I"\n"); + Produce::up(Emit::tree()); + +@h During clauses. +We've now seen one use of scenes: they kick off rulebooks when they begin or +end. The other use for them is to predicate rules on whether they are currently +playing or not, using a "during" clause. + +This is where we compile Inter code to test that a scene matching this is +actually running: + += +void RTScenes::emit_during_clause(parse_node *spec) { + int stuck = TRUE; + if (K_scene == NULL) { Produce::val(Emit::tree(), K_truth_state, LITERAL_IVAL, 1); return; } + if (Rvalues::is_rvalue(spec)) { + Dash::check_value(spec, K_scene); + instance *I = Rvalues::to_instance(spec); + if (Instances::of_kind(I, K_scene)) { + scene *sc = Scenes::from_named_constant(I); + Produce::inv_primitive(Emit::tree(), EQ_BIP); + Produce::down(Emit::tree()); + Produce::inv_primitive(Emit::tree(), LOOKUP_BIP); + Produce::down(Emit::tree()); + Produce::val_iname(Emit::tree(), K_value, Hierarchy::find(SCENE_STATUS_HL)); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, (inter_ti) sc->allocation_id); + Produce::up(Emit::tree()); + Produce::val(Emit::tree(), K_number, LITERAL_IVAL, 1); + Produce::up(Emit::tree()); + stuck = FALSE; + } + } else { + if (Dash::check_value(spec, Kinds::unary_con(CON_description, K_scene)) == ALWAYS_MATCH) { + parse_node *desc = Descriptions::to_rvalue(spec); + if (desc) { + Produce::inv_call_iname(Emit::tree(), Hierarchy::find(DURINGSCENEMATCHING_HL)); + Produce::down(Emit::tree()); + Specifications::Compiler::emit_as_val(K_value, desc); + Produce::up(Emit::tree()); + stuck = FALSE; + } + } + } + if (stuck) { + Produce::val(Emit::tree(), K_truth_state, LITERAL_IVAL, 1); + StandardProblems::sentence_problem(Task::syntax_tree(), + _p_(PM_ScenesBadDuring), + "'during' must be followed by the name of a scene or of a " + "description which applies to a single scene", + "such as 'during Station Arrival' or 'during a recurring scene'."); + return; + } +} diff --git a/inform7/if-module/Chapter 3/Showme Command.w b/inform7/runtime-module/Chapter 5/Showme Command.w similarity index 88% rename from inform7/if-module/Chapter 3/Showme Command.w rename to inform7/runtime-module/Chapter 5/Showme Command.w index e5dc629dc..44ec3932c 100644 --- a/inform7/if-module/Chapter 3/Showme Command.w +++ b/inform7/runtime-module/Chapter 5/Showme Command.w @@ -1,4 +1,4 @@ -[PL::Showme::] Showme Command. +[RTShowmeCommand::] Showme Command. A plugin to provide some support for the SHOWME testing command. @@ -7,14 +7,14 @@ This doesn't in fact do anything, except to provide one service when it's plugged in. = -void PL::Showme::start(void) { - PluginManager::plug(PRODUCTION_LINE_PLUG, PL::Showme::production_line); +void RTShowmeCommand::start(void) { + PluginManager::plug(PRODUCTION_LINE_PLUG, RTShowmeCommand::production_line); } -int PL::Showme::production_line(int stage, int debugging, +int RTShowmeCommand::production_line(int stage, int debugging, stopwatch_timer *sequence_timer) { if (stage == INTER5_CSEQ) { - BENCH(PL::Showme::compile_SHOWME_details) + BENCH(RTShowmeCommand::compile_SHOWME_details) } return FALSE; } @@ -31,7 +31,7 @@ We will show either/or properties first, on their own line, and then value properties. = -void PL::Showme::compile_SHOWME_details(void) { +void RTShowmeCommand::compile_SHOWME_details(void) { inter_name *iname = Hierarchy::find(SHOWMEDETAILS_HL); packaging_state save = Routines::begin(iname); inter_symbol *t_0_s = LocalVariables::add_named_call_as_symbol(I"t_0"); @@ -40,25 +40,25 @@ void PL::Showme::compile_SHOWME_details(void) { Produce::down(Emit::tree()); Produce::code(Emit::tree()); Produce::down(Emit::tree()); - PL::Showme::compile_SHOWME_type(FALSE, t_0_s, na_s); - PL::Showme::compile_SHOWME_type(TRUE, t_0_s, na_s); + RTShowmeCommand::compile_SHOWME_type(FALSE, t_0_s, na_s); + RTShowmeCommand::compile_SHOWME_type(TRUE, t_0_s, na_s); Produce::up(Emit::tree()); Produce::up(Emit::tree()); Routines::end(save); Hierarchy::make_available(Emit::tree(), iname); } -void PL::Showme::compile_SHOWME_type(int val, inter_symbol *t_0_s, inter_symbol *na_s) { +void RTShowmeCommand::compile_SHOWME_type(int val, inter_symbol *t_0_s, inter_symbol *na_s) { kind *K; LOOP_OVER_BASE_KINDS(K) if (Kinds::Behaviour::is_object(K)) - PL::Showme::compile_SHOWME_type_subj(val, KindSubjects::from_kind(K), t_0_s, na_s); + RTShowmeCommand::compile_SHOWME_type_subj(val, KindSubjects::from_kind(K), t_0_s, na_s); instance *I; LOOP_OVER_INSTANCES(I, K_object) - PL::Showme::compile_SHOWME_type_subj(val, Instances::as_subject(I), t_0_s, na_s); + RTShowmeCommand::compile_SHOWME_type_subj(val, Instances::as_subject(I), t_0_s, na_s); } -void PL::Showme::compile_SHOWME_type_subj(int val, inference_subject *subj, inter_symbol *t_0_s, inter_symbol *na_s) { +void RTShowmeCommand::compile_SHOWME_type_subj(int val, inference_subject *subj, inter_symbol *t_0_s, inter_symbol *na_s) { @; Produce::inv_primitive(Emit::tree(), IF_BIP); @@ -79,7 +79,7 @@ void PL::Showme::compile_SHOWME_type_subj(int val, inference_subject *subj, inte property *prn; LOOP_OVER(prn, property) if (Properties::is_value_property(prn) == val) - if (PL::Showme::is_property_worth_SHOWME(subj, prn, t_0_s, na_s)) + if (RTShowmeCommand::is_property_worth_SHOWME(subj, prn, t_0_s, na_s)) todo = TRUE; if (todo == FALSE) return; @@ -122,23 +122,23 @@ second of just one from "person". property *prn; LOOP_OVER(prn, property) if (Properties::is_value_property(prn) == val) - PL::Showme::compile_property_SHOWME(subj, prn, t_0_s, na_s); + RTShowmeCommand::compile_property_SHOWME(subj, prn, t_0_s, na_s); @ We actually use the same routine for both testing and compiling: = -int PL::Showme::is_property_worth_SHOWME(inference_subject *subj, property *prn, inter_symbol *t_0_s, inter_symbol *na_s) { - return PL::Showme::SHOWME_primitive(subj, prn, FALSE, t_0_s, na_s); +int RTShowmeCommand::is_property_worth_SHOWME(inference_subject *subj, property *prn, inter_symbol *t_0_s, inter_symbol *na_s) { + return RTShowmeCommand::SHOWME_primitive(subj, prn, FALSE, t_0_s, na_s); } -void PL::Showme::compile_property_SHOWME(inference_subject *subj, property *prn, inter_symbol *t_0_s, inter_symbol *na_s) { - PL::Showme::SHOWME_primitive(subj, prn, TRUE, t_0_s, na_s); +void RTShowmeCommand::compile_property_SHOWME(inference_subject *subj, property *prn, inter_symbol *t_0_s, inter_symbol *na_s) { + RTShowmeCommand::SHOWME_primitive(subj, prn, TRUE, t_0_s, na_s); } @ So here goes. = -int PL::Showme::SHOWME_primitive(inference_subject *subj, property *prn, int comp, inter_symbol *t_0_s, inter_symbol *na_s) { +int RTShowmeCommand::SHOWME_primitive(inference_subject *subj, property *prn, int comp, inter_symbol *t_0_s, inter_symbol *na_s) { if (IXProperties::is_shown_in_index(prn) == FALSE) return FALSE; if (RTProperties::can_be_compiled(prn) == FALSE) return FALSE; diff --git a/inform7/runtime-module/Chapter 5/The Score.w b/inform7/runtime-module/Chapter 5/The Score.w new file mode 100644 index 000000000..5d88d3afc --- /dev/null +++ b/inform7/runtime-module/Chapter 5/The Score.w @@ -0,0 +1,26 @@ +[RTTheScore::] The Score. + +@ + += +void RTTheScore::support(table *ranking_table) { + if (ranking_table) { + inter_name *iname = Hierarchy::find(RANKING_TABLE_HL); + Emit::named_iname_constant(iname, K_value, RTTables::identifier(ranking_table)); + Hierarchy::make_available(Emit::tree(), iname); + global_compilation_settings.ranking_table_given = TRUE; + } else { + inter_name *iname = Hierarchy::find(RANKING_TABLE_HL); + Emit::named_generic_constant(iname, LITERAL_IVAL, 0); + Hierarchy::make_available(Emit::tree(), iname); + } + inter_name *iname = Hierarchy::find(INITIAL_MAX_SCORE_HL); + Hierarchy::make_available(Emit::tree(), iname); + if (VariableSubjects::has_initial_value_set(max_score_VAR)) { + inter_ti v1 = 0, v2 = 0; + RTVariables::seek_initial_value(iname, &v1, &v2, max_score_VAR); + Emit::named_generic_constant(iname, v1, v2); + } else { + Emit::named_numeric_constant(iname, 0); + } +} diff --git a/inform7/runtime-module/Contents.w b/inform7/runtime-module/Contents.w index 3b4005cff..73e902eda 100644 --- a/inform7/runtime-module/Contents.w +++ b/inform7/runtime-module/Contents.w @@ -70,3 +70,6 @@ Chapter 5: Plugin Support Backdrops Regions The Map + Showme Command + The Score + Scenes