Classes in I6T

I’m interested in looking at the I6 classes (K1_room, K2_thing, etc.) used by I7. Namely, where they are defined and particularly the contents of add_to_scope. Does anybody know where they are defined? I was hoping to find them in Definitions but no dice.

Unfortunately, those classes don’t come from any I6T files—they’re produced by the compiler every time a new kind is defined in I7. (“K1” means “first defined kind”, etc.) The reason why the first few kinds have to be defined in a specific order is so that their compiler-generated class names match the ones used in the I6T kits. (K1_room, K2_thing, K4_door, K7_backdrop…)

1 Like

Ah. It’s run through the usual mechanisms and then Inform just expects the names to exist. That explains it. Them being named so candidly in the routines threw me off and made me hope I could dig them up somewhere. Appreciate the clarification! And that helps in a lot of additional ways.

I don’t suppose the contents of add_to_scope are discoverable anywhere in particular?

Two options: dig through the compiler guts, or reverse-engineer the I6 produced by the compiler (auto.inf in the build directory). I’d recommend the latter, because I’ve never been able to comprehend half the compiler guts myself. But it is open-source now, so both options are available!

1 Like

Oh! This auto file looks absolutely perfect! I finally don’t have to go digging around in random spots to see where all of these loose ends are leading. Thank you :>