segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
segment inherits unique_segment, so unique_segment members can be
referenced from an instance of segment. Eventually, segment will be
removed. Adjust references to go through unique_segment to support this
change.
gcc-9 warns on taking the address of an unaligned member in a packed
structure. This structure does not need to be packed. Remove
__attribute__((packed)) and fix the code to implement I/O correctly
without packing.
Ambient sound effects have always been buggy in certain topologies,
since `ambient_mark_bfs` refuses to cross its own path. Consider a
corridor:
L _ _ _ _ _ _ _ _ _ _
_ _
_ L
Where L is a lavafall emitting sound, whitespace is insignificant, _ is
a segment, * is a tagged segment, and / is a segment that should be
tagged, but is not. Let the leftmost L be a lower number segment than
the lower L. Sound propagation after the first step is:
L * * * * * _ _ _ _ _
* _
* L
After the second step, it should be:
L * * * * * * * * _ _
* *
* L
However, `ambient_mark_bfs` will stop when it hits the intersection, so
instead the result is:
L * * * * * / / / _ _
* *
* L
To further confuse the issue, emitter segments are processed in memory
order, so if the leftmost L is a higher index segment than the lower L,
the lower L will be processed first and the steps will be:
L _ * * * * * * * _ _
_ *
_ L
L * * * * * * * * _ _
/ *
/ L
Rewrite the propagation to record the travel depth remaining at each
node, and permit it to cross a segment with a lower depth remaining than
the current step. This still stops early when traversal attempts to
backtrack over itself, but permits it to visit, tag, and cross segments
that were previously visited by a different emitter.