So, I’ve come across another issue that’s completely stumped me. This is the extension code I’m using.
Test by Climbingstars begins here.
"Test Extension."
Section 1 - Z-machine Announce Story File Version Rule (for Z-machine only)
Include (-
[ ANNOUNCE_STORY_FILE_VERSION_R ix;
if (actor ~= player) rfalse;
Banner();
print "Inform 7 v", (PrintI6Text) I7_FULL_VERSION_NUMBER, "^";
if (UUID_ARRAY->0 >= 6) {
print "Identification number: ";
for (ix=6: ix <= UUID_ARRAY->0: ix++) print (char) UUID_ARRAY->ix;
print "^";
}
ix = 0; ! shut up compiler warning
if (standard_interpreter > 0) {
print "Standard interpreter ",
standard_interpreter/256, ".", standard_interpreter%256,
" (", HDR_TERPNUMBER->0;
print (char) HDR_TERPVERSION->0;
print ")^";
} else {
print "Interpreter ", HDR_TERPNUMBER->0, " Version ";
print (char) HDR_TERPVERSION->0;
print "^";
}
ShowExtensionVersions();
say__p = 1;
];
-) replacing "ANNOUNCE_STORY_FILE_VERSION_R".
Section 2 - Glulx Announce Story File Version Rule (for Glulx only)
Include (-
[ ANNOUNCE_STORY_FILE_VERSION_R ix;
if (actor ~= player) rfalse;
Banner();
print "Inform 7 v", (PrintI6Text) I7_FULL_VERSION_NUMBER, "^";
if (UUID_ARRAY->0 >= 6) {
print "Identification number: ";
for (ix=6: ix <= UUID_ARRAY->0: ix++) print (char) UUID_ARRAY->ix;
print "^";
}
@gestalt 1 0 ix;
print "Interpreter version ", ix / $10000, ".", (ix & $FF00) / $100,
".", ix & $FF, " / ";
@gestalt 0 0 ix;
print "VM ", ix / $10000, ".", (ix & $FF00) / $100, ".", ix & $FF, "^";
ShowExtensionVersions();
say__p = 1;
];
-) replacing "ANNOUNCE_STORY_FILE_VERSION_R".
Test ends here.
Basically, the I6 code for the announce the story file version rule copied verbatim into I6 includes, and this is the main code running it.
"Test"
Include Test by Climbingstars.
[Section 1 - Main Code]
Before reading a command when the initial text display state is false (this is the initial text rule):
follow the announce the story file version rule;
follow the initial room description rule;
now the initial text display state is true.
The initial text display state is a truth state that varies. The initial text display state is false.
The initial room description rule is not listed in the startup rulebook. The display banner rule is not listed in the startup rulebook.
The Testing Room is a Room. The description of the testing room is "This is a Test!".
When run as is, it runs completely fine, giving this as its output.
Test
An Interactive Fiction
Release 1 / Serial number 240613 / Inform 7 v10.1.2 / D
Inform 7 v10.1.2
Identification number: //AA456F5B-5EA8-4292-A767-47CE5B726D50//
Interpreter version 1.3.7 / VM 3.1.3
Test by Climbingstars
Testing Room
This is a Test!
>
However, if I uncomment the section header in the main code, it gives this.
Testing Room
This is a Test!
Testing Room
This is a Test!
>
Huh? How on earth is a version command somehow turning into essentially a look command and why is this being caused by uncommenting something that’s essentially supposed to be non code?
This only seems to happen with Glulx. ZCode doesn’t’ve this issue.
Other than the fact that certain functions appears in different places, the generated I6 code seems pretty much the same.
The only thing left at this point that I think could be causing this issue is the I6 compiler.
Any ideas? Thanks!