Determining where backdrops are

Test it without dynamic lists in the mix.

repeat with locus running through rooms:
if B is a floating object in locus, say B.

It still thinks that those backdrops are in every room.

Have you been able to reproduce this in a test project?

–Erik

I bet I7 switches over from a found_in array to a routine when the number of rooms becomes large. (Because of Z-code limits on property array lengths.)

However, I haven’t built a test case to check this guess.

This seems to be the minimal code to replicate the behaviour. (There are 17 rooms. foo is only in the first 16 of them, but the test thinks it’s in every one).

[code]“Room for Improvement” by Sam Kabo Ashwell

room1 is a room. room2 is a room. room3 is a room. room4 is a room. room5 is a room. room6 is a room. room7 is a room. room8 is a room. room9 is a room. room10 is a room. room11 is a room. room12 is a room. room13 is a room. room14 is a room. room15 is a room. room16 is a room. room17 is a room.

foo is a backdrop. foo is in room1, room2, room3, room4, room5, room6, room7, room8, room9, room 10, room11, room12, room13, room14, room15, room16.

To decide whether (B - a backdrop) is a floating object in (R - a room):
(- TestFloatingObjects({B},{R}) -)

Include (-
[ TestFloatingObjects o r k l m address flag;
address = o.&found_in;
if (address ~= 0 && o hasnt absent) {
if (ZRegion(address–>0) == 2) {
m = address–>0;
.TestPropositionally;
if (m.call® ~= 0) return true;
}
else {
k = o.#found_in;
for (l=0 : l<k/WORDSIZE : l++) {
m = address–>l;
if (ZRegion(m) == 2) jump TestPropositionally;
if (m == r || m in r) rtrue;
}

  }

}
return false;
];
-)

When play begins:
let X be 0;
repeat with locus running through rooms begin;
now X is X + 1;
if foo is a floating object in locus, say “[X]: [foo] is in [locus][line break]”;
end repeat;[/code]

Okay, remember my correction at https://intfiction.org/t/if-archive-hugo-downloads/59/1 ? You need to do that.

And that works beautifully. Thanks again.