Adams: "auto get/drop" in ScottFree source?

A friend is compiling ScottFree for some new target machines and is confused about what this means, and so am I:

        /* Some games use // to mean no auto get/drop word! */
        if(ip->AutoGet && strcmp(ip->AutoGet,"//") && strcmp(ip->AutoGet,"/*"))
            char *t;

I haven’t been able to locate any SA-format games using that double slash in the item name and am not even sure what they’re trying to say here. Any ideas?

My understanding of this is that (if I use Adv01 as an example)

"Dead fish/FIS/"

Has an automatic action GET/DROP (GET FIS), but

"Sleeping bear"

does not. But that it would be perfectly legal to define the bear like:

"Sleeping bear//"

with the same result (no automatic GET/DROP-action).

Does this make sense?


Ahhh, that does make sense. We were getting caught up in ideas like “is this referring to SF’s GET/DROP ALL capability?” and “wait, is there some SA game where the player automatically picks up every item?”

Thanks, I think that explains it.

Have you actually ever seen it in the wild, though?

No. (Haven’t looked either).

I don’t think this will work in every SA-interpreter that’s out there, but one could always try it by modifing the DAT-file…

Of the 42 43 game files i currently have sitting on my computer, none of them contains a “double-slash” object definition, like "Sleeping bear//". It makes you wonder what game(s) the ScottFree interpreter writers encountered. Maybe some “previously undiscovered” game?

I agree with Henrik’s conclusion anyhow.

Edit: One hypothesis: It’s possible that some binary versions of the game files for some platform may have used slashes as object entry delimiters (rather than using a newline or a null-terminated string), making them mandatory for that particular data format. Then when those were dumped to the TRS-80 .sao/.dat format, the extra slashes remained.

I think the leading slash in strcmp(ip->AutoGet,"//") && strcmp(ip->AutoGet,"/*") is just an escape character, as they are within double quotes, so it’s just looking for a slash or an asterisk.

The reason it’s looking for it is what Henrik Åsman said. If it has the delimited noun at the end of the object description, then it can be taken without needing a specific action handler. If it doesn’t have it, then it is immoveable or there are some conditions associated with it being taken.

1 Like